zotonic/webzmachine — pull request #11 by amiramix (2013-06-07 15:29:22+00:00)
Title: Update lager

Changes that match changes in Zotonic in pull-request from a branch of the same name (update-lager).

Three main changes:

- Switch logging and performance logging on/off by simply enabling/disabling the logging directory option (and allow to use separate folders for the access and performance logs)

- This is probably important: in the old code if z_stats was used as the "webmachine_logger_module", the "webmachine_logger" gen_server was not being started at all. But it is required by z_stats to make the actual logging. I pulled sources from master and verified that in the current code the access logs are not created! How can it work for you? Maybe it's down to a different configuration? Anyways, now with the default configuration "webmachine_logger" is being started IN ADDITION to any custom logger module. It's just a gen_server so it can run with a very small footprint but it will be useful to have it running in case the custom logger module wants to leverage it to do the actual logging (like z_stats).

- And of course another change is reading the log directories from the application configuration, which steams from tidying-up logs in Zotonic (the other pull-request).