{
"repo": "liblog",
"timestamp": "2026-01-16T23:56:25.351Z",
"entryPoint": "index.js",
"exports": {
"packageJson": {}
},
"api": {},
"readme": {
"content": "## liblog\n\nSimple logging library with a unified interface to [os_log](https://developer.apple.com/documentation/os/logging?language=objc), [syslog](https://www.man7.org/linux/man-pages/man3/syslog.3.html), [Logcat](https://developer.android.com/tools/logcat), and [TraceLogging](https://learn.microsoft.com/en-us/windows/win32/tracelogging/).\n\n## Usage\n\n```c\n#include <log.h>\n\nlog_debug(\"Current pid: %u\", getpid());\n```\n\n### Consuming logs\n\n#### macOS\n\nOn macOS, [Console.app](https://support.apple.com/en-gb/guide/console/welcome/mac) and the `log` tool can be used to consume logs. To show only messages for a given binary, such as `my-app`, pass the `--predicate` flag:\n\n```sh\nlog stream --predicate \"process == 'my-app'\"\n```\n\n#### Linux\n\nOn Linux, [`journalctl`](https://www.man7.org/linux/man-pages/man1/journalctl.1.html) can be used to consume logs. To show only messages for a given binary, such as `my-app`, pass the `--identifier` flag:\n\n```sh\njournalctl --identifier my-app\n```\n\n#### And",
"sections": [
"liblog",
"usage",
"api",
"license"
],
"hasApi": true,
"hasExamples": true,
"exampleCount": 6,
"examples": [
"### Consuming logs\n\n#### macOS\n\nOn macOS, [Console.app](https://support.apple.com/en-gb/guide/console/welcome/mac) and the `log` tool can be used to consume logs. To show only messages for a given binary, such as `my-app`, pass the `--predicate` flag:",
"#### Linux\n\nOn Linux, [`journalctl`](https://www.man7.org/linux/man-pages/man1/journalctl.1.html) can be used to consume logs. To show only messages for a given binary, such as `my-app`, pass the `--identifier` flag:",
"#### Android\n\nOn Android, [`logcat`](https://developer.android.com/tools/logcat) can be used to consume logs. To show only messages for a given binary, such as `my-app`, pass a filterspec:"
]
},
"patterns": []
}