Runs some checks over the log settings before building a {@link Corquet} instance.
498502
protected void checkLoggingSettings() {
        final LoggingSettings logSettings = settings.getLoggingSettings();
        final LogFile logFileSettings = logSettings.getLogFile();

        if(logFileSettings.getCurrentLogFilename() != null &&
           logFileSettings.isEnabled() == false) {
            LOG.warn("You specified a log file, but have it disabled");
        }

        if(logFileSettings.isEnabled() &&
           logFileSettings.getCurrentLogFilename() == null) {
            throw new IllegalStateException("You enabled logging to a file, but didn't specify the file name");
        }
    }
945557
public function beforeCompile(): void
	{
		$config = $this->validateConfig($this->defaults);

		if ($config['autoload'] === true) {
			if ($config['lazy'] === true) {
				$this->doBeforeCompileLaziness();
			} else {
				$this->doBeforeCompile();
			}
		}
	}
1063854
private void initialize(Configuration conf) {
    this.nodeHealthScript = conf.get(HEALTH_CHECK_SCRIPT_PROPERTY);
    this.intervalTime = conf.getLong(HEALTH_CHECK_INTERVAL_PROPERTY,
        DEFAULT_HEALTH_CHECK_INTERVAL);
    this.scriptTimeout = conf.getLong(HEALTH_CHECK_FAILURE_INTERVAL_PROPERTY,
        DEFAULT_HEALTH_SCRIPT_FAILURE_INTERVAL);
    String[] args = conf.getStrings(HEALTH_CHECK_SCRIPT_ARGUMENTS_PROPERTY,
        new String[] {});
    timer = new NodeHealthMonitorExecutor(args);
  }
66704
def setup_logging(options=None):
    """"""
    level = logging.DEBUG if options is not None and options.debug \
        else logging.WARNING
    console = logging.StreamHandler()
    console.setLevel(level)
    formatter = logging.Formatter('%(name)s: %(levelname)-8s %(message)s')
    console.setFormatter(formatter)
    logging.getLogger('parquet').setLevel(level)
    logging.getLogger('parquet').addHandler(console)
442649
@PostConstruct
    public void prepare() {
        Preconditions.checkNotNull(messageSource, "MessageSource should not be null");
        LOGGER.info(this.getClass().getSimpleName() + " has been initialized properly");
        localeContext = LocaleUtil.parseLocale(locale);
    }
750914
void prepare() {

        if (getMeasures() == null || getMeasures().isEmpty())
            setMeasureObjects(Arrays.asList(HLAMeasure.values()));
        else
            setMeasureObjects(HLAMeasure.convert(getMeasures()));

        if (getUserName() != null && !getUserName().isEmpty())
            setExtractor(SonarHLAFactory.getExtractor(getHostUrl(), getUserName(), getPassword()));
        else
            setExtractor(SonarHLAFactory.getExtractor(getHostUrl()));

        setConverter(SonarHLAFactory.getConverterInstance());

        LOG.info("Initialized " + getMeasureObjects().size() + " measures.");
    }
380949
private void initXlog() {
    LogConfiguration config = new LogConfiguration.Builder()
        .logLevel(BuildConfig.DEBUG ? LogLevel.ALL             // Specify log level, logs below this level won't be printed, default: LogLevel.ALL
            : LogLevel.NONE)
        .tag(getString(R.string.global_tag))                   // Specify TAG, default: "X-LOG"
        // .t()                                                // Enable thread info, disabled by default
        // .st(2)                                              // Enable stack trace info with depth 2, disabled by default
        // .b()                                                // Enable border, disabled by default
        // .jsonFormatter(new MyJsonFormatter())               // Default: DefaultJsonFormatter
        // .xmlFormatter(new MyXmlFormatter())                 // Default: DefaultXmlFormatter
        // .throwableFormatter(new MyThrowableFormatter())     // Default: DefaultThrowableFormatter
        // .threadFormatter(new MyThreadFormatter())           // Default: DefaultThreadFormatter
        // .stackTraceFormatter(new MyStackTraceFormatter())   // Default: DefaultStackTraceFormatter
        // .borderFormatter(new MyBoardFormatter())            // Default: DefaultBorderFormatter
        // .addObjectFormatter(AnyClass.class,                 // Add formatter for specific class of object
        //     new AnyClassObjectFormatter())                  // Use Object.toString() by default
        .addInterceptor(new BlacklistTagsFilterInterceptor(    // Add blacklist tags filter
            "blacklist1", "blacklist2", "blacklist3"))
        // .addInterceptor(new WhitelistTagsFilterInterceptor( // Add whitelist tags filter
        //     "whitelist1", "whitelist2", "whitelist3"))
        // .addInterceptor(new MyInterceptor())                // Add a log interceptor
        .build();

    Printer androidPrinter = new AndroidPrinter();             // Printer that print the log using android.util.Log
    Printer filePrinter = new FilePrinter                      // Printer that print the log to the file system
        .Builder(new File(Environment.getExternalStorageDirectory(), "xlogsample").getPath())       // Specify the path to save log file
        .fileNameGenerator(new DateFileNameGenerator())        // Default: ChangelessFileNameGenerator("log")
        // .backupStrategy(new MyBackupStrategy())             // Default: FileSizeBackupStrategy(1024 * 1024)
        // .cleanStrategy(new FileLastModifiedCleanStrategy(MAX_TIME))     // Default: NeverCleanStrategy()
        .flattener(new ClassicFlattener())                     // Default: DefaultFlattener
        .build();

    XLog.init(                                                 // Initialize XLog
        config,                                                // Specify the log configuration, if not specified, will use new LogConfiguration.Builder().build()
        androidPrinter,                                        // Specify printers, if no printer is specified, AndroidPrinter(for Android)/ConsolePrinter(for java) will be used.
        filePrinter);

    // For future usage: partial usage in MainActivity.
    globalFilePrinter = filePrinter;
  }
30891
@Override
    protected void logResources() throws SystemException
    {
        final boolean traceOn = TraceComponent.isAnyTracingEnabled();

        if (traceOn && tc.isEntryEnabled())
            Tr.entry(tc, "logResources", _resourcesLogged);

        if (!_resourcesLogged)
        {
            if (_asyncResourceObjects != null)
            {
                for (JTAAsyncResourceBase resource : _asyncResourceObjects)
                {
                    if (resource.getResourceStatus() == StatefulResource.PREPARED)
                    {
                        recordLog(resource);
                    }
                }
            }

            super.logResources(); // this will set _resourcesLogged to true
        }

        if (traceOn && tc.isEntryEnabled())
            Tr.exit(tc, "logResources");
    }
10304
protected static void initLogger ()
    {
        // if a custom class was specified as a system property, use that
        Factory factory = createConfiguredFactory();

        // create and a log4j logger if the log4j configuration system property is set
        try {
            if (factory == null && System.getProperty("log4j.configuration") != null) {
                factory = (Factory)Class.forName("com.samskivert.util.Log4JLogger").newInstance();
            }
        } catch (SecurityException se) {
            // in a sandbox, no biggie
        } catch (Throwable t) {
            System.err.println("Unable to instantiate Log4JLogger: " + t);
        }

        // create and a log4j2 logger if the log4j2 configuration system property is set
        try {
            if (factory == null && System.getProperty("log4j.configurationFile") != null) {
                factory = (Factory)Class.forName("com.samskivert.util.Log4J2Logger").newInstance();
            }
        } catch (SecurityException se) {
            // in a sandbox, no biggie
        } catch (Throwable t) {
            System.err.println("Unable to instantiate Log4J2Logger: " + t);
        }

        // lastly, fall back to the Java logging system
        if (factory == null) {
            factory = new JDK14Logger();
        }

        // and finally configure our factory
        setFactory(factory);
    }
1003724
public static void preRegister(Context context, PrintWriter w) {
        context.put(Log.class, (Context.Factory<Log>) (c -> new Log(c, w)));
    }
854067
@Override
	protected synchronized void beforeStart()
	{
		super.beforeStart();

		((SipStandardContext)context).setJ2EEServer("MSS-Arquillian-7-" + UUID.randomUUID().toString());
		Tomcat.initWebappDefaults(context);
	}
52670
public void initRound(Log other) {
        this.noticeWriter = other.noticeWriter;
        this.warnWriter = other.warnWriter;
        this.errWriter = other.errWriter;
        this.sourceMap = other.sourceMap;
        this.recorded = other.recorded;
        this.nerrors = other.nerrors;
        this.nwarnings = other.nwarnings;
    }
927933
function(appender) {
		if (appender instanceof Log4js.Appender) {
			appender.setLogger(this);
			this.appenders.push(appender);			
		} else {
			throw "Not instance of an Appender: " + appender;
		}
	}
356682
protected static void lazyInit() {
        // noinspection DoubleCheckedLocking
        if (instance == null) {
            try {
                STARTUP_LOCK.lockInterruptibly();
                try {
                    if (instance == null) {
                        instance = new ProviderUtil();
                    }
                } finally {
                    STARTUP_LOCK.unlock();
                }
            } catch (final InterruptedException e) {
                LOGGER.fatal("Interrupted before Log4j Providers could be loaded.", e);
                Thread.currentThread().interrupt();
            }
        }
    }
1232366
def before_run(self):
        """"""
        # Actions and checks counters
        self.nb_checks = 0
        self.nb_internal_checks = 0
        self.nb_checks_launched = 0
        self.nb_actions_launched = 0

        self.nb_checks_results = 0
        self.nb_checks_results_timeout = 0
        self.nb_checks_results_passive = 0
        self.nb_checks_results_active = 0

        self.nb_actions_results = 0
        self.nb_actions_results_timeout = 0
        self.nb_actions_results_passive = 0

        self.nb_broks_dropped = 0
        self.nb_checks_dropped = 0
        self.nb_actions_dropped = 0

        # Broks, notifications, ... counters
        self.nb_broks = 0
        self.nb_notifications = 0
        self.nb_event_handlers = 0
        self.nb_external_commands = 0

        self.ticks = 0
409992
public function preprocessChecks()
    {
        // Checks
        if (!$this->objectClass) {
            user_error(
                _t('Consumer.NoObjectClass', 'No objectClass set in the subclass'),
                E_USER_WARNING
            );
        }
        if (!is_array($this->columnMap)) {
            user_error(
                _t('Consumer.NoColumnMap', 'No columnMap set in the subclass'),
                E_USER_WARNING
            );
        }
        if (!is_array($this->duplicateChecks)) {
            user_error(
                _t('Consumer.NoDuplicateChecks', 'No duplicateChecks set in subclass'),
                E_USER_WARNING
            );
        }
    }
941376
@Override
	public synchronized void configChanged(Properties newConfig) {
		if (LOGGER.isDebugEnabled()) {
			LOGGER.debug("Reloading Jawr configuration");
		}
		try {
			// Initialize the Thread local for the Jawr context
			ThreadLocalJawrContext.setJawrConfigMgrObjectName(JmxUtils.getMBeanObjectName(servletContext, resourceType,
					jawrConfig.getProperty(JawrConstant.JAWR_JMX_MBEAN_PREFIX)));

			// clears resource bundle cache for the refresh
			ResourceBundle.clearCache();
			StopWatch stopWatch = ThreadLocalJawrContext.getStopWatch();
			if (stopWatch != null && stopWatch.isRunning()) {
				stopWatch.stop();
			}

			Properties props = propertiesSource.getConfigProperties();
			// override the properties if needed
			if (this.overrideProperties != null) {
				props.putAll(overrideProperties);
			}
			props.putAll(newConfig);

			initializeJawrContext(props);

			if (LOGGER.isDebugEnabled()) {
				LOGGER.debug("Jawr configuration succesfully reloaded. ");
			}

		} catch (InterruptBundlingProcessException e) {
			if (LOGGER.isInfoEnabled()) {
				LOGGER.info(resourceType + " bundling process Interrupted");
			}
		} catch (Exception e) {
			throw new BundlingProcessException("Error reloading Jawr config: " + e.getMessage(), e);
		} finally {

			// Reset the Thread local for the Jawr context
			ThreadLocalJawrContext.reset();
		}

	}