Skip to main content

Python bindings for the unified logging and tracing system of macOS

Project description

Version on Pypi Test status (master) Docs build status (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:

$ pip install macos-oslog

This will also install any prerequisite Python packages.

For more details and alternative ways to install, see Installation.

Documentation

Change History

Quick Start

Example Python code:

#!/usr/bin/env python
import macos_oslog

log = 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:

#!/usr/bin/env python
import macos_oslog

macos_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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macos-oslog-0.5.0.tar.gz (12.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page