UALogger 0.3 Released
UALogger is a logging tool for iOS and Mac apps. Think of it as NSLog
on steroids.
It allows you to add information like the file and line number to your logs,
customize when to log to the console and when not to,
and allows collection of the entire recent console log for your application.
It includes the UALogger
class and class methods, and a few handy macros.
I just finished updating a cool feature in UALogger: Severity Level Filtering.
As of version 0.3
, UALogger can be setup to work with log severity levels.
Each of the three logging macros (UALogPlain
, UALogBasic
, and UALogFull
),
as well as the shorthand macro (UALog
),
has a new variation that lets you pass in a UALoggerSeverity
UASLogPlain
UASLogBasic
UASLogFull
UASLog
(Defaults toUASLogBasic
)
The S
stands for severity, and is the first argument in those functions. UALogger recognizes 5 severities:
UALoggerSeverityDebug
(Lowest log level)UALoggerSeverityInfo
UALoggerSeverityWarn
UALoggerSeverityError
UALoggerSeverityFatal
(Highest Log Level)
To use the severity levels, you MUST set a minimumSeverity
for UALogger to use:
By default, the severity is UALoggerSeverityUnset
and thus, not used for determining when to log.
When unset, the [UALogger loggingEnabled]
method is used.
Once you set the minimumSeverity
to something else however,
ONLY the verbosity specified will be used to determine when to log.
For example:
Only 3 of the above lines are logged because they meet or exceed the minimum severity of UALoggerSeverityWarn
After setting the minimumSeverity
, any calls made to the non-S
functions will not log unless you unset it.
Check out the new version of UALogger on Github and let me know what you think!
Lastly, I run a small software company called Urban Apps. It pays the bills so I can take the time to write helpful utilities like UALogger. If you found this page helpful at all, I would really appreciate it if you would check out my Apps on the iTunes App Store.
Was this page helpful for you? Buy me a slice of 🍕 to say thanks!
Comments