docs.rs failed to build apple-log-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
apple-log
Safe Rust bindings for Apple's os_log on macOS — structured logging that integrates with Console.app and the log CLI.
Status: experimental. v0.1 ships per-subsystem
Logger, free-function logging viaOS_LOG_DEFAULT, all 5 standard levels (Default / Info / Debug / Error / Fault). v0.2 addsos_signpostfor performance tracing,OSLogStorefor reading back logs, andlogcrate facade impl.
Pure C (with a tiny shim file built via cc) — zero Swift bridge.
Quick start
use *;
Then in another terminal:
Or open Console.app and filter by subsystem.
Why os_log over log/tracing?
- System-integrated: visible in Console.app,
logCLI, system-wide log archives — even after your binary exits. - Persistent: error+ entries survive log rotation.
- Privacy-aware: format specifiers (
%{public}svs%{private}s) control redaction. - No I/O cost: the kernel buffers log records; expensive-to-format messages are skipped when no subscriber is active.
- Free for the user: integrates with existing macOS log infrastructure (sysdiagnose, MDM exports, etc.).
You can still wire log/tracing on top — both crates support pluggable backends.
your-app ──► apple-log ──► /private/var/db/diagnostics
│
├──► Console.app
├──► `log` CLI
└──► sysdiagnose archives
Roadmap
-
Logger::new(subsystem, category) -
Logger::{info, debug, error, fault}+log(level, msg)shortcut -
log()free function viaOS_LOG_DEFAULT - All 5 levels (Default / Info / Debug / Error / Fault)
-
Send + SyncLogger -
os_signpostfor performance tracing -
OSLogStoreto read back past logs from Rust -
log+tracingcrate facade backends - Format-string redaction control (
%{private}sselector)
License
Licensed under either of Apache-2.0 or MIT at your option.