Defined logging/index.js

Alias to comb.logging.Logger.getLogger. See comb.logging.Logger for more information.

Example
comb.logger("my.logger");
        
Source
Logger.getLogger.bind(Logger)
    
PropertyTypeDefault ValueDescription
rootLoggercomb.logging.LoggerrootLogger

The root for all loggers.

appender Static Function Public


Defined logging/index.js

Factory method for creating appenders. See comb.logging.appenders.Appender.createAppender for arguments.

Example
var appender = comb.logger.appender("ConsoleAppender");
comb.logger("my.logger").addAppender(appender);
        
Source
Appender.createAppender.bind(Appender)
    

configure Static Function Public


Defined logging/index.js

Shortcut to configure loggers.

Example
//same as new comb.logging.BasicConfigurator().configure();
comb.logger.configure();

//new comb.logging.PropertyConfigurator().configure("/location/to/logger/configuration.json");
comb.logger.configure("/location/to/logger/configuration.json");
        
Source
function (){
   var args = argsToArray(arguments), configurator;
   if (!args.length) {
       configurator = new configurators.BasicConfigurator();
   } else {
       var first = args[0];
       if (isHash(first) || isString(first)) {
           configurator = new configurators.PropertyConfigurator();
       } else {
           configurator = new configurators.BasicConfigurator();
       }
   }
   configurator.configure.apply(configurator, args);
   return this;
}
    

License

MIT https://github.com/C2FO/comb/raw/master/LICENSE

Meta