Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using os_log instead for writing to file #64

Open
nirs opened this issue Nov 7, 2024 · 0 comments
Open

Consider using os_log instead for writing to file #64

nirs opened this issue Nov 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nirs
Copy link
Member

nirs commented Nov 7, 2024

Advantages:

  • timestamps
  • can view the logs using Console.app
  • root not needed to view the log
  • we can simplify the logging macros added in Improve logging #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 Changed error code with v1.2.0  #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 nirs mentioned this issue Nov 7, 2024
@nirs nirs added the enhancement New feature or request label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant