Crates.io | macos-unifiedlogs |
lib.rs | macos-unifiedlogs |
version | 0.4.0 |
created_at | 2025-01-13 01:51:59.234777+00 |
updated_at | 2025-08-10 01:53:07.989868+00 |
description | A library to help parse macOS UnifiedLogs |
homepage | |
repository | https://github.com/mandiant/macos-unifiedlogs |
max_upload_size | |
id | 1513986 |
size | 1,253,667 |
A simple Rust library that can help parse the macOS Unified Log files.
Unified Logs were introduced in macOS version 10.12 (Sierra, 2016). Part of
Apple's goal to create a unified log format for all Apple products. They exist
on macOS, iOS, watchOS, tvOS. The Unified Logs replace many of the old log
formats Apple used. This library can be used to parse these log files.
Data that is currently extracted includes:
An example binary is available to download
unifiedlog_iterator
- Can parse a logarchive into a JSOL or CSV file. It can also parse the logs
on a live system. The output file will be quite largeIts been tested against millions of log entries. However, due the complexity of the Unified Log format there are some limitations:
No printf style error code lookup support. This library does not do any error
code lookups for log messages. The native log
command on macOS supports
error code lookups when it encounters printf style %m
messages.
For example the log message: 'Failed to open file, error: %m'
a. This Library outputs:
Failed to open file, error: 1
b. The macOS Log command outputs:
Failed to open file, error: no such file or directory
This library supports most custom objects in log messages. However, unsupported objects will be base64 encoded