Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andy-maier/macos-oslog
Python bindings for the unified logging and tracing system of macOS
https://github.com/andy-maier/macos-oslog
Last synced: 1 day ago
JSON representation
Python bindings for the unified logging and tracing system of macOS
- Host: GitHub
- URL: https://github.com/andy-maier/macos-oslog
- Owner: andy-maier
- License: apache-2.0
- Created: 2022-09-04T18:31:23.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-04T23:44:05.000Z (over 2 years ago)
- Last Synced: 2025-01-18T12:16:46.237Z (24 days ago)
- Language: C
- Size: 5.36 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
macos-oslog - Python bindings for the unified logging and tracing system of macOS
=================================================================================.. image:: https://badge.fury.io/py/macos-oslog.svg
:target: https://pypi.python.org/pypi/macos-oslog/
:alt: Version on Pypi.. image:: https://github.com/andy-maier/macos-oslog/workflows/test/badge.svg?branch=master
:target: https://github.com/andy-maier/macos-oslog/actions/
:alt: Test status (master).. image:: https://github.com/andy-maier/macos-oslog/workflows/docs/badge.svg?branch=master
:target: https://github.com/andy-maier/macos-oslog/actions?query=workflow%3Adocs
:alt: Docs build status (master).. # .. image:: https://coveralls.io/repos/github/andy-maier/macos-oslog/badge.svg?branch=master
.. # :target: https://coveralls.io/github/andy-maier/macos-oslog?branch=master
.. # :alt: Test coverage (master)Overview
--------This package is only for macOS and requires macOS 10.12 or higher.
Its purpose is to insert log messages into the unified logging and tracing system
of macOS. It does not support reading the unified log.Installation
------------To install the latest released version of the macos_oslog
package into your active Python environment:.. code-block:: bash
$ pip install macos-oslog
This will also install any prerequisite Python packages.
For more details and alternative ways to install, see
`Installation`_... _Installation: https://andy-maier.github.io/macos-oslog/html/docs/install.html#installation
Documentation
-------------* `Documentation for latest released version `_
Change History
--------------* `Change history for latest released version `_
Quick Start
-----------Example Python code:
.. code-block:: python
#!/usr/bin/env python
import macos_osloglog = macos_oslog.os_log_create(subsystem="com.acme.myapp", category="all")
macos_oslog.os_log(log, macos_oslog.OS_LOG_TYPE_ERROR, "Some error happened")
macos_oslog.os_log_release(log)Example Python code using the predefined standard log provided by macOS:
.. code-block:: python
#!/usr/bin/env python
import macos_oslogmacos_oslog.os_log(macos_oslog.OS_LOG_DEFAULT, macos_oslog.OS_LOG_TYPE_ERROR, "Some error happened")
Contributing
------------For information on how to contribute to the
macos-oslog project, see
`Contributing `_.License
-------The macos-oslog project is provided under the
`Apache Software License 2.0 `_.