apple-log
Safe Rust bindings for Apple's unified logging stack on macOS.
apple-log v0.5 adds a Swift bridge on top of the C os APIs and the Swift os / OSLog modules, covering:
LoggerOSLogOSLogStoreOSLogEntryLogOSLogEntrySignpostOSLogEntryBoundaryOSLogEntryActivityOSSignpostIDOSSignposterOSActivityOSAtomic
Platform: macOS 12+ (the bridge uses Swift
LoggerandOSSignposter).
Quick start
use Duration;
use *;
Areas and modules
apple_log::logger::Loggerand compatibility free functions inapple_log::logapple_log::os_log::OSLogapple_log::os_log_store::{OSLogStore, OSLogPosition, OSLogStoreEntry}apple_log::os_log_entry_*typed entry wrappersapple_log::os_signpost_id::OSSignpostIdapple_log::os_signposter::OSSignposterapple_log::os_activity::OSActivityapple_log::os_atomic::{OSAtomicI32, OSAtomicI64, OSAtomicQueue, OSAtomicFifoQueue}
Raw C FFI
The crate keeps the low-level C shim behind the raw-ffi feature. The feature is enabled by default for backwards compatibility.
[]
= { = "0.5", = false }
Enable raw-ffi when you want direct access to the wrapped C symbols under apple_log::ffi.
Examples
The crate ships one numbered example per logical area in examples/01_logger.rs through examples/11_os_atomic.rs.
Coverage
See COVERAGE.md for the SDK audit and implementation matrix.
License
Licensed under either Apache-2.0 or MIT at your option.