https://github.com/rsms/asl-logging
Convenience functions and example code for using ASL (Apple System Log facility)
https://github.com/rsms/asl-logging
Last synced: 9 months ago
JSON representation
Convenience functions and example code for using ASL (Apple System Log facility)
- Host: GitHub
- URL: https://github.com/rsms/asl-logging
- Owner: rsms
- Created: 2009-03-22T23:17:14.000Z (about 17 years ago)
- Default Branch: master
- Last Pushed: 2009-03-23T01:50:16.000Z (about 17 years ago)
- Last Synced: 2025-04-11T12:41:45.506Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 82 KB
- Stars: 14
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logging with ASL -- Apple System Logger
## Convenience functions
`logging.h` and `logging.c` includes convenience functionality suitable for
most small-to-medium scale programs. Have a look at `usage.c` for a
minimalistic example or `example.c` for a more complete program.
You can build and test the `example.c` program by running make:
make
./example --help
When logging.h is used in Objective-C, there are an extra set of macros defined for logging with NSStrings and related arguments. These macros begin with a capital letter L (i.e. Log_info).
## Objective-C ASLLogger
The `objc` directory contain a Objective-C OOP library, designed in Apple Foundation fashion. The ASLLogger provide, in contrast to the `logging.h` convenience macros, thread safety. ASLLoggers and ASLConnections are stored in thread-local space. However; passing instances of ASLLogger between threads will cause problems. You should instead aquire new loggers for each thread using `+(ASLLogger *)loggerForModule:(NSString *)m`.
You can build and test the `objc/example.m` program:
cd objc
make
./example
## About
By [Rasmus Andersson](http://hunch.se/)