Initialize logging global info.

@author Vova Feldman (@svovaf)
@since  1.2.1.6
763559
private static function init() {
			self::$_ownerName          = function_exists( 'get_current_user' ) ?
				get_current_user() :
				'unknown';
			self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
			self::$_abspathLength      = strlen( ABSPATH );
			self::$_processID          = mt_rand( 0, 32000 );

			// Process ID may be `false` on errors.
			if ( ! is_numeric( self::$_processID ) ) {
				self::$_processID = 0;
			}
		}
7694
def init_logging(log_level=logging.DEBUG):
    
    logging.root.handlers = []  # remove possible side-effects from other libs
    logger = logging.getLogger("inginious")
    logger.setLevel(log_level)
    ch = logging.StreamHandler()
    ch.setLevel(log_level)
    formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
    ch.setFormatter(formatter)
    logger.addHandler(ch)
371209
private static function init(): void
    {
        if (static::$initialized === false) {
            $baseClass = Base::getInstance();

            static::$initialized = true;
            static::$logDir = $baseClass->parsePath((string)$baseClass->Log->logDirectory);
            static::$classConfig = $baseClass->Log->classConfig->toArray();

            if (static::$logDir != '') {
                Directory::create(static::$logDir);
            }
        }
    }
290608
function init() {
        $this->does_generate = ACTION_NONE;
        $this->title     = strtolower(get_class($this));
        $this->str       = array();
        $this->output    = NULL;
        $this->errormsg  = NULL;
        $this->subaction = NULL;
        $this->sesskey_protected = true;
    }
1320950
protected function initialize()
	{
		$this->log('initialisatie', LOG_DEBUG);

		// in case of multiple remote hosts use the first
		$remote_host = is_array($this->remote_host) ? $this->remote_host[0] : $this->remote_host;

		$this->timestamp = time();
		$this->remote_target_dir = strtr($this->remote_dir_format, array('%project_name%' => $this->project_name, '%timestamp%' => date($this->remote_dir_timestamp_format, $this->timestamp)));

        if ($timestamps = $this->findPastDeploymentTimestamps($remote_host, $this->remote_dir)) {
            list($this->previous_timestamp, $this->last_timestamp) = $timestamps;
        }

		if ($this->previous_timestamp)
		{
			$this->previous_remote_target_dir = strtr($this->remote_dir_format, array('%project_name%' => $this->project_name, '%timestamp%' => date($this->remote_dir_timestamp_format, $this->previous_timestamp)));
		}

		if ($this->last_timestamp)
		{
			$this->last_remote_target_dir = strtr($this->remote_dir_format, array('%project_name%' => $this->project_name, '%timestamp%' => date($this->remote_dir_timestamp_format, $this->last_timestamp)));
		}
	}
1258155
protected function logInfo()
  {
    $args   = func_get_args();
    $format = array_shift($args);

    foreach ($args as &$arg)
    {
      if (!is_scalar($arg)) $arg = var_export($arg, true);
    }

    if (sizeof($args)==0)
    {
      $this->log($format, \Project::MSG_INFO);
    }
    else
    {
      $this->log(vsprintf($format, $args), \Project::MSG_INFO);
    }
  }
938915
public void initImpl()
  {
    if (_level == null) {
      return;
    }
    
    if (_names.size() == 0) {
      _names.add("");
    }
    
    for (String name : _names) {
      _logger = Logger.getLogger(name);
    
      if (_level != null) {
        _logger.setLevel(_level);
      }

      if (_useParentHandlers != null) {
        _logger.setUseParentHandlers(_useParentHandlers.booleanValue());
      }
    
      for (Handler handler : _handlerList) {
        _logger.addHandler(handler);
      }
    
      if (_filter != null) {
        _logger.setFilter(_filter);
      }
    }
  }
970651
public function init()
    {
        // init the audit module
        Yii::app()->getModule('audit');

        // catch fatal errors
        if ($this->catchFatalErrors) {
            register_shutdown_function(array($this, 'handleFatalError'));
            //Yii::app()->onEndRequest[] = array($this, 'handleFatalError');
            if (substr(php_sapi_name(), 0, 3) != 'cli') {
                ob_start(array($this, 'handleFatalBuffer'));
            }
        }

        // track the request
        if ($this->trackAllRequests)
            $this->getAuditRequest();

        // call parent
        parent::init();
    }
1078275
public function init() {

        $args = $this->console->arguments;

        $args->parse();

        if ( $args->defined('hardstart') ) {

            $this->hardstart();

        }

        if ( $args->defined('daemon') ) {

            $this->daemonize();

        } else if ( $args->defined('foreground') ) {

            if ( $args->defined('verbose') ) {
                $this->logger->pushHandler(new LogHandler());
            }

            $this->start();

        } else {

            $this->console->pad()->green()->usage();
            $this->end(0);

        }

    }
576204
def init_log
      Log.program_name = "stats_manager"
      Log.log_to_file_only(true)
      Log.init("stats_manager", Platform.filesystem.temp_dir, :print => true)
      RightSupport::Log::Mixin.default_logger = Log
      true
    end
1172114
public function init()
    {
        $this->getLogger();

        // Verify Licensing
        //$this->licenseCheck('atk4');

        // send headers, no caching
        $this->sendHeaders();

        $this->cleanMagicQuotes();

        parent::init();

        // in addition to default initialization, set up logger and template
        $this->initializeTemplate();

        if (get_class($this) == 'App_Web') {
            $this->setConfig(array('url_postfix' => '.php', 'url_prefix' => ''));
        }
    }
561794
private function init()
    {
        $logger = null; //$this->logger($wurflConfig->logger);
        $context = new WURFL_Context($this->persistenceStorage, $this->cacheStorage, $logger);
        $userAgentHandlerChain = WURFL_UserAgentHandlerChainFactory::createFrom($context);
        $deviceRepository = $this->deviceRepository($this->persistenceStorage, $userAgentHandlerChain);
        $wurflService = new WURFL_WURFLService($deviceRepository, $userAgentHandlerChain, $this->cacheStorage);
        $requestFactory = new WURFL_Request_GenericRequestFactory();
        $this->wurflManager = new WURFL_WURFLManager($wurflService, $requestFactory);
    }
216047
public function Init()
    {
        $oGlobal = TGlobal::instance();
        $this->aUserInput = $oGlobal->GetUserData('aInput');
        if (!is_array($this->aUserInput)) {
            $this->aUserInput = array();
        }

        if (!array_key_exists(MTShopArticleCatalogCore::URL_ITEM_ID, $this->aUserInput)) {
            $oGlobal = TGlobal::instance();
            $this->aUserInput[MTShopArticleCatalogCore::URL_ITEM_ID] = $oGlobal->GetUserData(MTShopArticleCatalogCore::URL_ITEM_ID);
        }

        $aInitInputData = array('name', 'email', 'toname', 'toemail', 'comment', 'captcha');
        foreach ($aInitInputData as $sField) {
            if (!array_key_exists($sField, $this->aUserInput)) {
                $this->aUserInput[$sField] = '';
            }
        }
        $this->aUserInput = $this->FilterUserData($this->aUserInput);
    }
247004
private synchronized void initialize()
    {
        if (!_initialized)
        {
            FacesContext context = FacesContext.getCurrentInstance();

            if (isFacelets2Enabled(context))
            {
                logWarningIfLegacyFaceletViewHandlerIsPresent(context);

                if (MyfacesConfig.getCurrentInstance(
                        context.getExternalContext()).isSupportJSPAndFacesEL())
                {
                    _supportedLanguages = new ViewDeclarationLanguageStrategy[2];
                    _supportedLanguages[0] = new FaceletViewDeclarationLanguageStrategy();
                    _supportedLanguages[1] = new JspViewDeclarationLanguageStrategy();
                }
                else
                {
                    _supportedLanguages = new ViewDeclarationLanguageStrategy[1];
                    _supportedLanguages[0] = new FaceletViewDeclarationLanguageStrategy();
                }
            }
            else
            {
                // Support JSP only
                _supportedLanguages = new ViewDeclarationLanguageStrategy[1];
                _supportedLanguages[0] = new JspViewDeclarationLanguageStrategy();
            }

            _initialized = true;
        }
    }
1059637
public function initSettingsData()
    {
        $this->log_events = true;
        $this->log_requests = false;
        $this->log_theme = false;
    }
563358
public function init()
    {
        Logger::log('Dispatcher init');
        parent::init();
        $this->initiateStats();
        I18nHelper::setLocale();
        $this->bindWarningAsExceptions();
        $this->actualUri = Request::getInstance()->getServer('REQUEST_URI');
        Logger::log('End dispatcher init');
    }
583622
def initialize_logging(self):
        """"""
        # Reset logging to pass logrecords into the queue to the frontend only.
        # Existing handlers may be broken as they were copied into a new process,
        # so should be discarded.
        for loggername in [None] + list(logging.Logger.manager.loggerDict.keys()):
            logger = logging.getLogger(loggername)
            while logger.handlers:
                logger.removeHandler(logger.handlers[0])

        # Re-enable logging to console
        root_logger = logging.getLogger()

        # By default pass all warning (and higher) level messages to the frontend
        root_logger.setLevel(logging.WARN)
        root_logger.addHandler(workflows.logging.CallbackHandler(self._log_send))

        # Set up the service logger and pass all info (and higher) level messages
        # (or other level if set differently)
        self.log = logging.getLogger(self._logger_name)

        if self.start_kwargs.get("verbose_log"):
            self.log_verbosity = logging.DEBUG
        self.log.setLevel(self.log_verbosity)

        # Additionally, write all critical messages directly to console
        console = logging.StreamHandler()
        console.setLevel(logging.CRITICAL)
        root_logger.addHandler(console)