ColdBox/coldbox-platform — pull request #202 by sigmaprojects (2014-11-06 06:32:22+00:00)
Title: Update Logger.cfc

Added ability to just thread logMessage at will by a configuration, instead of having a separate "AsyncSomeAppender.cfc" for every time you need to thread something.
Configuration is simple, uses the already existing "properties" argument struct when registering an appender to watch for a new key called "async" which must be true.

For example, this logBox struct which is the default in the application templates, makes the ConsoleAppender threaded just be passing the properties={async=true}.

logBox = {
// Define Appenders
appenders = {
coldboxTracer = { class="coldbox.system.logging.appenders.ConsoleAppender",properties={async:true} }
},
// Root Logger
root = { levelmax="INFO", appenders="*" },
// Implicit Level Categories
info = [ "coldbox.system" ]
};