<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Jeremy,<div class=""><br class=""></div><div class="">The statics on the Log struct are a convenience facade. They supply a simple, pre-defined way for application developers to log at the five most common log levels. The rationale for it is described here:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/emaloney/CleanroomLogger#full-disclosure-a-note-about-global-state" class="">https://github.com/emaloney/CleanroomLogger#full-disclosure-a-note-about-global-state</a></div><div class=""><br class=""></div><div class="">However, you can have far more granular control if you wish by instantiating and using your own LogChannels and LogReceptacles.</div><div class=""><br class=""></div><div class="">That said, if this logger doesn't work for you, and if you have strong opinions about how logging should work in Swift, you might want to consider joining the&nbsp;Swift Standard Logging Community, which grew out of the various Swift mailing lists, and is looking to tackle common use cases:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/swift-logging/specifications" class="">https://github.com/swift-logging/specifications</a></div><div class=""><br class=""></div><div class="">All the best,</div><div class="">E.</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 10, 2015, at 4:46 AM, Jeremy Pereira &lt;<a href="mailto:jeremy.j.pereira@googlemail.com" class="">jeremy.j.pereira@googlemail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi,<br class=""><br class="">One thing your logger is missing is the ability to set different log levels for different modules and source files. Moreover, I think it would actually be quite difficult for you to add this functionality with all the static functions.<br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">On 9 Dec 2015, at 20:52, Evan Maloney via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:<br class=""><br class="">Over on some of the other Swift mailing lists, people have been asking about Swift logging engines; since this list seems to be the right place to discuss them, I hope you'll indulge me in letting you know about CleanroomLogger, a real logging engine written in pure Swift:<br class=""><br class=""><a href="https://github.com/emaloney/CleanroomLogger" class="">https://github.com/emaloney/CleanroomLogger</a><br class=""><br class="">Why do I say it's a real logging engine? Because the other pure Swift loggers I've run across are all just wrappers around print().<br class=""><br class="">Loggers that just call print() aren't actually sending messages to the system console; if you use these loggers and expect to read their output through Console.app, you'll be out of luck.<br class=""><br class="">CleanroomLogger writes to the Apple System Log (ASL) facility, just like NSLog() does. But unlike NSLog(), which can bog down your app if not used judiciously, CleanroomLogger is designed to be performant, so you don't have to worry that your desire for diagnostics is going to kill your app's performance.<br class=""><br class="">CleanroomLogger is mature enough to be shipping in significantly-revenue-generating apps, and the project now has over 500 stars on GitHub. I hope you'll find it useful.<br class=""><br class="">In the meantime, if you're interested in furthering the state of Swift logging, please reach out to me. Alex Kolov has set up a swift-logging org on GitHub to help drive Swift logging standards; community involvement desired:<br class=""><br class="">https://github.com/swift-logging<br class=""><br class="">Thanks for your time,<br class="">E. Maloney<br class="">Gilt Groupe<br class=""><br class=""><br class="">_______________________________________________<br class="">swift-users mailing list<br class="">swift-users@swift.org<br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></div></body></html>