socket_vmnet icon indicating copy to clipboard operation
socket_vmnet copied to clipboard

Consider using os_log instead for writing to file

Open nirs opened this issue 1 year ago • 0 comments

Advantages:

  • timestamps
  • can view the logs using Console.app
  • root not needed to view the log
  • we can simplify the logging macros added in #46

Disadvantages:

  • using a log file is easier
  • does not work when running interactively (e.g. during debugging)
  • does not work for testing socket_vmnet, running it from a script and testing the output #99
  • may not work when socket_vmnet is run via another program that want to manage its logs (e..g lima, saving logs to ~/.lima/_network/socket_vment*.log

It can work if we add an option to opt-int, which can be used in the launchd service.

Links: https://developer.apple.com/documentation/os/os_log

nirs avatar Nov 07 '24 23:11 nirs