What is the free available good logging framework for cocoa?

I am currently using NSLog to log in from my OS X application. But NSLog does not give me control over the log level, size and number of log files. Another problem that I encounter in NSLog, even though I redirect log entries to a file, I still see entries in the syslog (using the console).

I found the log4cocoa registration framework , but it looks very old. Before making a decision and starting to use log4cocoa, I want to know what all the free logging frameworks are available for cocoa and the advantages / disadvantages of these.

Update. I also found another logging structure called lumberjack . I am going to try these two and see how honest they are.

+4
source share
2 answers

Check out the best magazine for cocoa .

+4
source

OS X includes an integrated logging system, a system logger (ASL). ASL supports multiple output streams and logging levels.

The Peter Hosey series in ASL is still the best introduction to the system and its API. The ASL API is in C, but it's pretty easy to write an Objective-C wrapper and some preprocessor macros to make your life easier. Google Toolbox for Mac has a GTMLogger class that supports flat-file, stdout, and ASL files (via the GTMLogger + ASL category). If you don't mind accepting an additional dependency, I would use GTM and its GTMLogger tools.

+6
source

Source: https://habr.com/ru/post/1343608/


All Articles