Skip to content

Commit 6546824

Browse files
committed
Minor readme improvements
1 parent cb57026 commit 6546824

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ Log output can be enabled or disabled globally by switching between the desired
6262
```python
6363
import pyoslog
6464
log = pyoslog.OS_LOG_DEFAULT
65-
pyoslog.os_log(log, 'Log output enabled')
65+
pyoslog.os_log(log, 'Log output enabled') # will appear in the unified log
6666
log = pyoslog.OS_LOG_DISABLED
67-
pyoslog.os_log(log, 'Log output disabled')
67+
pyoslog.os_log(log, 'Log output disabled') # will not appear in the unified log
6868
```
6969

7070
It is also possible to check whether individual log types are enabled for a particular log object:
@@ -74,7 +74,7 @@ import pyoslog
7474
pyoslog.os_log_type_enabled(pyoslog.OS_LOG_DEFAULT, pyoslog.OS_LOG_TYPE_DEBUG)
7575
```
7676

77-
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.
7878

7979
### Integration with the logging module
8080
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
105105
log stream --predicate 'subsystem == "ac.robinson.pyoslog"' --level debug
106106
```
107107

108-
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.
109109

110110
### 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)).
112112
The pyoslog module handles this for you – there is no need to `del` or release these objects.
113113

114114

@@ -127,15 +127,15 @@ python -m unittest
127127
```
128128

129129
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.
131131

132132

133133
## 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).
135135
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.
136136
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.
137137

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:
139139

140140
- [apple_os_log_py](https://github.com/cedar101/apple_os_log_py)
141141
- [pymacoslog](https://github.com/douglas-carmichael/pymacoslog)

0 commit comments

Comments
 (0)