Returns the custom logging handler modules
171770
def ssh_wrapper(opts, functions=None, context=None):
    '''
    
    '''
    return LazyLoader(
        _module_dirs(
            opts,
            'wrapper',
            base_path=os.path.join(SALT_BASE_PATH, os.path.join('client', 'ssh')),
        ),
        opts,
        tag='wrapper',
        pack={
            '__salt__': functions,
            '__grains__': opts.get('grains', {}),
            '__pillar__': opts.get('pillar', {}),
            '__context__': context,
            },
    )
1328749
def get_registered_loggers(hide_children=False, hide_reusables=False):
    

    return [logger for logger in logging.Logger.manager.loggerDict.keys()
            if not (hide_reusables and "reusables" in logger)
            and not (hide_children and "." in logger)]
1051248
def get_formatter(self, handler):
        
        if isinstance(handler, logging.handlers.SysLogHandler):
            formatter = '[%(levelname)-9s]'
        else:
            formatter = '[%(asctime)s] [%(levelname)-9s]'

        for p in self.prefix:
            formatter += ' [%s]' % (p)
        formatter = formatter + ' %(message)s'
        return logging.Formatter(formatter)
31106
def EXTRA_LOGGING(self):
        

        input_text = get('EXTRA_LOGGING', '')
        modules = input_text.split(',')
        if input_text:
            modules = input_text.split(',')
            modules = [x.split(':') for x in modules]
        else:
            modules = []
        return modules
1120373
def get_logger(name=None):
    '''
    
    '''
    logger = logging.getLogger(name)
    if len(logger.handlers) == 0:
        logger = add_stream_handler(logger)
    return logger
132869
def get_handler_classes(self):
        """"""

        handler_classes = [import_string(handler_cls) for handler_cls in settings.MODERNRPC_HANDLERS]

        if self.protocol == ALL:
            return handler_classes
        else:
            return [cls for cls in handler_classes if cls.protocol in ensure_sequence(self.protocol)]
1336951
def logger_has_handlers(logger):
    
    if six.PY3:
        return logger.hasHandlers()
    else:
        c = logger
        rv = False
        while c:
            if c.handlers:
                rv = True
                break
            if not c.propagate:
                break
            else:
                c = c.parent
        return rv
189162
function customLogEvent(level) {

  // options should contain the appenders and handlers to override the
  // global ones defined in errorAppenders, and errorHandlers.
  // Used by Canadarm.localWatch to wrap local appender calls.
  return function (message, exception, data, settings) {

    // If we are are below the current Canadarm.loggingLevel we
    // should not do anything with the passed information.  Return
    // as if nothing happened.
    if (Canadarm.levelOrder.indexOf(level) < Canadarm.levelOrder.indexOf(Canadarm.loggingLevel)) {
      return;
    }

    var options = settings || {},
      attrs = gatherErrors(level, exception, message, data, options.appenders);
    pushErrors(attrs, options.handlers);
  };
}
590368
def _get_loggers():
    """"""
    from .. import loader
    modules = loader.get_package_modules('logger')
    return list(loader.get_plugins(modules, [_Logger]))
378876
def _logger_api(self):
        """"""
        from .tcex_logger import TcExLogHandler, TcExLogFormatter

        api = TcExLogHandler(self.session)
        api.set_name('api')
        api.setLevel(logging.DEBUG)
        api.setFormatter(TcExLogFormatter())
        self.log.addHandler(api)
533325
def capture_log_messages( opts = {} )
      from = opts.fetch(:from, 'root')
      to = opts.fetch(:to, '__rspec__')
      exclusive = opts.fetch(:exclusive, true)

      appender = Logging::Appenders[to] || Logging::Appenders::StringIo.new(to)
      logger = Logging::Logger[from]
      if exclusive
        logger.appenders = appender
      else
        logger.add_appenders(appender)
      end

      before(:all) do
        @log_output = Logging::Appenders[to]
      end

      before(:each) do
        @log_output.reset
      end
    end
477963
def logs(self):
        """"""
        url = self._url + "/logs"
        return _log(url=url,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port)
779662
def capture_pywarnings(handler):
        """"""
        logger = logging.getLogger('py.warnings')
        # Check for previously installed handlers.
        for h in logger.handlers:
            if isinstance(h, handler.__class__):
                return
        logger.addHandler(handler)
        logger.setLevel(logging.WARNING)
1359688
def get_logger(name):
    """"""
    if not hasattr(logging.Logger, 'trace'):
        logging.addLevelName(TRACE_LEVEL, 'TRACE')

        def trace(self, message, *args, **kwargs):
            if self.isEnabledFor(TRACE_LEVEL):
                # Yes, logger takes its '*args' as 'args'.
                self._log(TRACE_LEVEL, message, args, **kwargs)

        logging.Logger.trace = trace

    log = logging.getLogger(name)
    if not log.handlers:
        log.addHandler(logging.NullHandler())
    return log
83563
private static function logger()
    {
        $settings = [
            'name' => config('app.name'),
            'level' => Logger::DEBUG,
            'path' => storage_path("logs/" . (PHP_SAPI === "cli" ? "cli.log" : "app.log"))
        ];

        $logger = new Logger($settings['name']);
        $handler = new StreamHandler($settings['path']);

        $lineFormatter = new LineFormatter;
        $lineFormatter->includeStacktraces();

        $handler->setFormatter($lineFormatter);

        return $logger->pushHandler($handler, $settings['level']);
    }
200941
def _lookup_handler(name):
    

    # Look up and load the handler factory
    for ep in pkg_resources.iter_entry_points('bark.handler', name):
        try:
            # Load and return the handler factory
            return ep.load()
        except (ImportError, pkg_resources.UnknownExtra):
            # Couldn't load it...
            continue

    raise ImportError("Unknown log file handler %r" % name)
1107806
def capture(package, prefix, modules=[], level=logging.DEBUG):
    
    handler = LogFileHandler(package, prefix)
    formatter = logging.Formatter(FORMAT)
    handler.setFormatter(formatter)
    modules = set(modules + ['loadkit'])

    for logger in modules:
        if not hasattr(logger, 'addHandler'):
            logger = logging.getLogger(logger)
        logger.setLevel(level=level)
        logger.addHandler(handler)

    return handler