Function registers Log facade using configuration in app.config.<env>.

        Note:
          The Log facade will be registered using default configuration
          if there isn't any 'log' key in app.config.<env>.
193200
def register_log(self):
        
        if not empty('log', self.config):

            if not empty('glim', self.config['log']):
                GlimLog.boot(name='glim', config=self.config['log']['glim'])
            else:
                GlimLog.boot(name='glim')

            if not empty('app', self.config['log']):
                Log.boot(name='app', config=self.config['log']['app'])
            else:
                Log.boot(name='app')
        else:
            Log.boot(name='app')
            GlimLog.boot(name='glim')
713085
public function register(Application $app)
    {
        $this->config = $app['config']->load('log');

        $handlers = $this->getHandlers($app);
        $app['log'] = $app->share(function ($app) use ($handlers) {
            return new Logger('main', $handlers);
        });

        $app->initializer('Synapse\\Log\\LoggerAwareInterface', function ($object, $app) {
            $object->setLogger($app['log']);
            return $object;
        });
    }
1227899
def log_config(self, logger):
        """'"""

        logger.info("app_name: %s", self.app_name)
        logger.info("app_version: %s", self.app_version)
        logger.info("current configuration:")
        config = [(key, self.option_definitions[key].value)
                  for key in self.option_definitions.keys_breadth_first()
                  if key not in self.keys_blocked_from_output]
        config.sort()
        for key, val in config:
            if (
                self.option_definitions[key].secret
                or 'password' in key.lower()
            ):
                logger.info('%s: *********', key)
            else:
                try:
                    logger.info('%s: %s', key,
                                to_string_converters[type(key)](val))
                except KeyError:
                    logger.info('%s: %s', key, val)
1316145
function init(config){
    var logger = new LogglyLogger(config);
    logger.validateConfig();

    logger.config = config;
    logger.client = loggly.createClient({
        token: config.token,
        subdomain: config.application,
        auth: config.auth,

        // TOOD: pushing more tags onto this array, or not using them, should be configurable
        tags: [
            config.domain,
            config.machine
        ]

        // Loggly docs say it uses json stringify if json:true
        // JSON stringify does not handle Errors or circulare references well
        // Logger.createEntry handles them well
    });
    return logger;
}
628340
function (build, logger) {
                //Make sure config has a log level, and if not,
                //make it "silent" by default.
                config.logLevel = config.hasOwnProperty('logLevel') ?
                                  config.logLevel : logger.SILENT;

                var result = build(config);

                //Reset build internals on each run.
                requirejs._buildReset();

                if (callback) {
                    callback(result);
                }
            }
609178
public function registerEnvironment()
	{
		$this->app->bindShared('view', function($app)
		{
			// Next we need to grab the engine resolver instance that will be used by the
			// environment. The resolver will be used by an environment to get each of
			// the various engine implementations such as plain PHP or Sword engine.
			$resolver = $app['view.engine.resolver'];

			$finder = $app['view.finder'];

			$env = new Environment($resolver, $finder, $app['events']);

			// We will also set the container instance on this view environment since the
			// view composers may be classes registered in the container, which allows
			// for great testable, flexible composers for the application developer.
			$env->setContainer($app);

			$env->share('app', $app);

			return $env;
		});
	}
338522
def _init_trace_logging(self, app):
        
        enabled = not app.config.get(CONF_DISABLE_TRACE_LOGGING, False)

        if not enabled:
            return

        self._trace_log_handler = LoggingHandler(
            self._key, telemetry_channel=self._channel)

        app.logger.addHandler(self._trace_log_handler)
958733
public static void configureRegistry(NodeManager node, Log log, String npmRegistryUrl) {
        try {
            node.factory().getNpmRunner(node.proxy()).execute("config set registry " + npmRegistryUrl);
        } catch (TaskRunnerException e) {
            log.error("Error during the configuration of NPM registry with the url " + npmRegistryUrl + " - check log", e);
        }
    }
1257415
def register_app(self, app):
        
        app.route(self.uri, methods=self.methods)(self.callable_obj)

        return self
131261
public function registerEnvironment()
    {

        // add the application instance to the environment
        Environment::singleton()->setAttribute(EnvironmentKeys::APPLICATION, $this);

        // create s simulated request/session ID whereas session equals request ID
        Environment::singleton()->setAttribute(EnvironmentKeys::SESSION_ID, $sessionId = SessionUtils::generateRandomString());
        Environment::singleton()->setAttribute(EnvironmentKeys::REQUEST_ID, $sessionId);
    }
229015
function (config) {
    config = config || {};
    Appender.call(this, config);

    /**
     * Log file name, initialized from the configuration. Folders up to the
     * file must exist beforehand.
     */
    this.fileName = config.fileName;

    /**
     * Append log events to the end of the file when true, clear the file
     * before writing the first log event otherwise.
     */
    this.appendToFile = (typeof config.append !== 'undefined') ?
      !!config.append :
      true;

    /**
     * True to log strings instead of objects
     */
    this.appendStrings = (typeof config.appendStrings !== 'undefined') ?
      config.appendStrings :
      true;

    /**
     * The file stream, initialized by the "start" function
     */
    this.stream = null;
  }
473869
def configure_logging():
    

    if not parse_boolean(os.environ.get('DISABLE_TRUSTAR_LOGGING')):

        # configure
        dictConfig(DEFAULT_LOGGING_CONFIG)

        # construct error logger
        error_logger = logging.getLogger("error")

        # log all uncaught exceptions
        def log_exception(exc_type, exc_value, exc_traceback):
            error_logger.error("Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback))

        # register logging function as exception hook
        sys.excepthook = log_exception
1222495
private function config()
    {
        $this->_library->setEnvironment();
        $this->_library->setCharset();
        $this->_library->setLog();
    }
1013939
function (config) {
  this.config  = config;
  this.backend = this.config.backend || 'stdout';
  this.level   = this.config.level || "LOG_INFO";
  if (this.backend == 'stdout') {
    this.util = require('util');
  } else {
    if (this.backend == 'syslog') {
      this.util = require('modern-syslog');
      this.util.init(config.application || 'statsd', this.util.LOG_PID | this.util.LOG_ODELAY, this.util.LOG_LOCAL0);
    } else {
      throw "Logger: Should be 'stdout' or 'syslog'.";
    }
  }
}
973519
def register(cls):
        
        if not cls.IS_LOADED:
            cls.IS_LOADED = True

            yaml.add_constructor('!param', Parameter.parameter_constructor, Loader=yaml.SafeLoader)
            yaml.add_constructor('!env', EnvironmentVariable.parameter_constructor, Loader=yaml.SafeLoader)
811564
def init_app(self, app):
        
        self._key = app.config.get(CONF_KEY) or getenv(CONF_KEY)

        if not self._key:
            return

        self._endpoint_uri = app.config.get(CONF_ENDPOINT_URI)
        sender = AsynchronousSender(self._endpoint_uri)

        queue = AsynchronousQueue(sender)
        self._channel = TelemetryChannel(None, queue)

        self._init_request_logging(app)
        self._init_trace_logging(app)
        self._init_exception_logging(app)
690150
def init_app(app):
    
    config = EmailsConfig(app)
    # register extension with app
    app.extensions = getattr(app, 'extensions', {})
    app.extensions['emails'] = config
    return config