You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not possible to directly set a log object's mode from Python, but see the `config` section of `man log` for documentation about doing this in `sudo` mode.
77
+
It is not possible to directly set a log object's mode from Python, but see the [`config` section of `man log`](https://keith.github.io/xcode-man-pages/log.1.html#config) for documentation about doing this in `sudo` mode.
78
78
79
79
### Integration with the logging module
80
80
Use the pyoslog `Handler` to direct messages to pyoslog:
@@ -105,10 +105,10 @@ For example, to receive messages from the labelled subsystem used in the example
See `man log` for further details about the available options and filters.
108
+
See the `log` tool's manpages (`man log` or [online](https://keith.github.io/xcode-man-pages/log.1.html)) for further details about the available options and filters.
109
109
110
110
### Handling cleanup
111
-
When labelling subsystem and category using the native C methods there is a requirement to free the log object after use (using `os_release`).
111
+
When labelling subsystem and category using the native C methods there is a requirement to free the log object after use (using [`os_release`](https://developer.apple.com/documentation/os/1524245-os_release)).
112
112
The pyoslog module handles this for you – there is no need to `del` or release these objects.
113
113
114
114
@@ -127,15 +127,15 @@ python -m unittest
127
127
```
128
128
129
129
All of pyoslog's code is covered by tests, but please note that if Console.app is live-streaming messages, some tests may fail.
130
-
See [`test_logging.py`](https://github.com/simonrob/pyoslog/blob/main/tests/test_logging.py#L96) for discussion about why this is the case.
130
+
See [`test_logging.py`](https://github.com/simonrob/pyoslog/blob/main/tests/test_logging.py#L99) for discussion about why this is the case.
131
131
132
132
133
133
## Alternatives
134
-
At the time this module was created there were no alternatives available on [PyPi](https://pypi.org/search/?q=macos+unified+logging&c=Operating+System+%3A%3A+MacOS).
134
+
At the time this module was created there were no alternatives available on [PyPI](https://pypi.org/search/?q=macos+unified+logging&c=Operating+System+%3A%3A+MacOS).
135
135
Since then, the [macos-oslog](https://pypi.org/project/macos-oslog/) module has been released, with broadly equivalent functionality to pyoslog, except for the need to manually release the log object.
136
136
There is also [os-signpost](https://pypi.org/project/os-signpost/), which uses `cython` to provide the [`OSSignposter`](https://developer.apple.com/documentation/os/ossignposter) API, and could easily be extended to provide `os_log` functionality.
137
137
138
-
In addition, there are other options available if PyPi access is not seen as a constraint:
138
+
In addition, there are other options available if PyPI access is not seen as a constraint:
0 commit comments