Initializes the logger's formatter proc based on the value of format
 instance variable. This method should only be called inside the register
 method
 @private
765361
def init_formatter
      @formatter = proc do |s, d, p, m|
        "#{@format}\n" % { severity: s, datetime: d, progname: p, msg: m }
      end
    end
991434
def with_formatter(formatter):
    
    def _decorator_after_args(unwrapped):
        def _wrapped(self, *args, **kwargs):
            logging.debug('unwrapped: %s', unwrapped)
            logging.debug('self: %s', self)
            logging.debug('args: %s', args)
            logging.debug('kwargs: %s', kwargs)
            return_value = unwrapped(self, *args, **kwargs)
            if 'raw' in kwargs and kwargs['raw']:
                return return_value
            else:
                return formatter(return_value)
        return _wrapped
    return _decorator_after_args
1234142
def initialise_logging(level: str, target: str, short_format: bool):
    """"""
    try:
        log_level = getattr(logging, level)
    except AttributeError:
        raise SystemExit(
            "invalid log level %r, expected any of 'DEBUG', 'INFO', 'WARNING', 'ERROR' or 'CRITICAL'" % level
        )
    handler = create_handler(target=target)
    logging.basicConfig(
        level=log_level,
        format='%(asctime)-15s (%(process)d) %(message)s' if not short_format else '%(message)s',
        datefmt='%Y-%m-%d %H:%M:%S',
        handlers=[handler]
    )
756681
def set_format *args
      global, format = args.fetch_opts [nil], :type => :console, :time => ["%H:%M:%S", "%03d"]                  
      format = if format[:type] == :html; {
                    :caller => "<a class='l'>%f:%l</a> <a class='m'>:%m</a>", 
                    :format => "<div class='line'><a class='t'>%time</a> <a class='%mode'>%mode</m> [%caller]: <p>%text</p>%att</div>",
                    :att =>"<div class='att'><div class='hide'>+</div><pre>%s</pre></div>",
                    :serializer => RMTools::RMLogger::HTML
                  }; else {
                    :caller => "#{@c.gray('%f:%l')} #{@c.red_bold(':%m')}", 
                    :format => "%time %mode [%caller]: %text"
                  } end.merge format
      if global
        _set_format @default_format, format
      else
        _set_format(file_format={}, format)
        @file_formats[File.expand_path(caller[0].till ':')] = file_format
      end
    end
1306303
def init_logger(cls, log_level):
        """"""
        logger = logging.getLogger("AutoMLBoard")
        handler = logging.StreamHandler()
        formatter = logging.Formatter("[%(levelname)s %(asctime)s] "
                                      "%(filename)s: %(lineno)d  "
                                      "%(message)s")
        handler.setFormatter(formatter)
        logger.setLevel(log_level)
        logger.addHandler(handler)
        return logger
459050
def _init_log(level=logging.DEBUG):
    
    log = logging.getLogger(__file__)
    log.setLevel(level)
    handler = logging.StreamHandler(sys.stdout)
    handler.setLevel(level)
    formatter = logging.Formatter('%(asctime)s: %(message)s',
                                  '%Y/%m/%d-%H:%M:%S')
    handler.setFormatter(formatter)
    log.addHandler(handler)
    return log
381466
def logger(level = nil)
      unless @logger
        @logger = Logger.new(STDOUT)
        @logger.level = level || Logger::INFO
        @logger.formatter = proc do |severity, _datetime, _progname, msg|
          "#{identity} | " << "#{severity.downcase.capitalize}:".ljust(7) << " #{msg}\n"
        end
      end

      @logger.level = level unless level.nil?
      @logger
    end
528227
def initLogger():
    '''
    
    '''
    global logger
    logger = logging.getLogger('root')
    logger.setLevel(logging.DEBUG)
    ch = logging.StreamHandler(sys.stdout)
    ch.setLevel(logging.INFO)
    formatter = logging.Formatter("[%(asctime)s] %(levelname)s: %(message)s", "%Y-%m-%d %H:%M:%S")
    ch.setFormatter(formatter)
    logger.addHandler(ch)
757546
public static void w(String format, Object... args) {
    assertInitialization();
    sLogger.w(format, args);
  }
1348023
public static void d(String format, Object... args) {
    assertInitialization();
    sLogger.d(format, args);
  }
1082616
def logger_init(level):
    
    levellist = [logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG]
    handler = logging.StreamHandler()
    fmt = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) '
           '-35s %(lineno) -5d: %(message)s')
    handler.setFormatter(logging.Formatter(fmt))
    logger = logging.root
    logger.addHandler(handler)
    logger.setLevel(levellist[level])
52171
function (config) {
  if (!config) {
    config = defaultConfig
  }
  var error = validateConfig(config)
  if (error) {
  }
  config = assign(defaultConfig, config)
  return new BinderLogReader(config)
}
763416
public static void log(int logLevel, String format, Object... args) {
    assertInitialization();
    sLogger.log(logLevel, format, args);
  }
1123239
def __finish_initializing(self):
        

        if self.args.debug or self.args.trace:
            # Set the console (StreamHandler) to allow debug statements.

            if self.args.debug:
                self.console.setLevel(logging.DEBUG)

            self.console.setFormatter(logging.Formatter('[%(levelname)s] %(asctime)s %(name)s - %(message)s'))

            # Set the global level to debug.
            if self.args.debug:
                self.log.setLevel(logging.DEBUG)

        if self.args.log or self.log_file:

            # Allow the user to override the default log file handler.
            try:
                self.log_file_handler = sys.modules['__main__'].log_file_handler(self.args.log or self.log_file)
            except Exception:
                self.log_file_handler = logging.FileHandler(self.args.log or self.log_file)

            self.log_file_handler.setFormatter(logging.Formatter('[%(levelname)s] %(asctime)s %(name)s - %(message)s'))
            self.log_file_handler.setLevel(logging.DEBUG)

            self.log.addHandler(self.log_file_handler)

        # Allow cli.log, args & self to be accessed from __main__
        if not hasattr(sys.modules['__main__'], 'log'):
            sys.modules['__main__'].log = self.log

        if not hasattr(sys.modules['__main__'], 'cli'):
            sys.modules['__main__'].cli = self

        if not hasattr(sys.modules['__main__'], 'args'):
            sys.modules['__main__'].args = self.args
985943
function initialize() {
    var getRenderer = require( config.getRenderer ?
      path.join( './../../../', config.getRenderer ) :
      markedRenderer
    );
    var renderer = getRenderer( marked );
    filingCabinet = new FilingCabinet( config );

    readControls(
      config.controls,
      filingCabinet
    );
    readReferences(
      config.components,
      config.referenceFile,
      filingCabinet
    );
    readComponents(
      config.components,
      config.referenceFile,
      config.localeFile,
      config.layoutSegment,
      config.contentSegment,
      filingCabinet,
      renderer
    );
    readContents(
      config.contents,
      config.submenuFile,
      filingCabinet,
      renderer
    );

    logger.showInfo( '*** Validating elements...' );
    filingCabinet.finalize();
    logger.showInfo( '*** Content manager is initialized.' );

    contextFactory = new ContextFactory( config, filingCabinet );
  }
1353334
def configure(level=logging.WARNING, handler=None, formatter=None):
        
        if formatter is None:
            formatter = LogrFormatter()

        if handler is None:
            handler = logging.StreamHandler()

        handler.setFormatter(formatter)
        handler.setLevel(level)
        Logr.handler = handler
200339
function initLogging (config) {
    // only create logger if custom logging enabled
    if (config.logger !== true) {
        return
    }
    // create new logger instance
    var logger = new winston.Logger()
    // add transport
    logger.add(winston.transports.Console, {
        formatter: winstonFormatter,
        level: 'info'
    });
    // make logger accessible
    config.logger = logger
    // override console.log function
    console.log = function () {
        logger.info.apply(logger, formatArgs(arguments))
    }
    // override console.info function
    console.info = function () {
        logger.info.apply(logger, formatArgs(arguments))
    }
    // override console.warn function
    console.warn = function () {
        logger.warn.apply(logger, formatArgs(arguments))
    }
    // override console.error function
    console.error = function () {
        logger.error.apply(logger, formatArgs(arguments))
    }
    // override console.debug function
    console.debug = function () {
        logger.debug.apply(logger, formatArgs(arguments))
    }
}