public class Log4J2LoggingSystem extends Slf4JLoggingSystem
LoggingSystem
。AbstractLoggingSystem.LogLevels<T>
CONFIGURATION_COMPARATOR
NONE, ROOT_LOGGER_NAME, SYSTEM_PROPERTY
コンストラクターと説明 |
---|
Log4J2LoggingSystem(ClassLoaderSE classLoader) |
修飾子と型 | メソッドと説明 |
---|---|
void | beforeInitialize() ロギングシステムをリセットして、出力を制限します。 |
void | cleanUp() ロギングシステムをクリーンアップします。 |
LoggerConfiguration | getLoggerConfiguration(StringSE loggerName) LoggingSystem のロガーの現在の構成を返します。 |
ListSE<LoggerConfiguration> | getLoggerConfigurations() すべての LoggingSystem のロガーの現在の構成のコレクションを返します。 |
RunnableSE | getShutdownHandler() JVM の終了時にこのロギングシステムのシャットダウンを処理できる Runnable SE を返します。 |
protected StringSE[] | getStandardConfigLocations() このシステムの標準構成の場所を返します。 |
SetSE<LogLevel> | getSupportedLogLevels() ロギングシステムで実際にサポートされている LogLevels のセットを返します。 |
void | initialize(LoggingInitializationContext initializationContext, StringSE configLocation, LogFile logFile) ロギングシステムを完全に初期化します。 |
protected boolean | isClassAvailable(StringSE className) |
protected void | loadConfiguration(LoggingInitializationContext initializationContext, StringSE location, LogFile logFile) 特定の構成をロードします。 |
protected void | loadConfiguration(StringSE location, LogFile logFile) |
protected void | loadDefaults(LoggingInitializationContext initializationContext, LogFile logFile) ロギングシステムの適切なデフォルトをロードします。 |
protected void | reinitialize(LoggingInitializationContext initializationContext) 必要に応じて、ロギングシステムを再初期化します。 |
void | setLogLevel(StringSE loggerName, LogLevel logLevel) 指定されたロガーのログレベルを設定します。 |
isBridgeHandlerAvailable, isBridgeJulIntoSlf4j
applySystemProperties, getClassLoader, getPackagedConfigFile, getSelfInitializationConfig, getSpringConfigLocations, getSpringInitializationConfig
get
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public Log4J2LoggingSystem(ClassLoaderSE classLoader)
protected StringSE[] getStandardConfigLocations()
AbstractLoggingSystem
AbstractLoggingSystem
の getStandardConfigLocations
AbstractLoggingSystem.getSelfInitializationConfig()
protected boolean isClassAvailable(StringSE className)
public void beforeInitialize()
LoggingSystem
LoggingSystem.initialize(LoggingInitializationContext, String, LogFile)
の前に呼び出すことができます。Slf4JLoggingSystem
の beforeInitialize
public void initialize(LoggingInitializationContext initializationContext, StringSE configLocation, LogFile logFile)
LoggingSystem
AbstractLoggingSystem
の initialize
initializationContext
- ロギング初期化コンテキスト configLocation
- ログ構成の場所またはデフォルトの初期化が必要な場合は null
logFile
- 書き込まれるログ出力ファイル、またはコンソールのみの出力の場合は null
protected void loadDefaults(LoggingInitializationContext initializationContext, LogFile logFile)
AbstractLoggingSystem
AbstractLoggingSystem
の loadDefaults
initializationContext
- ロギング初期化コンテキスト logFile
- ロードするファイル、またはログファイルが書き込まれない場合は null
protected void loadConfiguration(LoggingInitializationContext initializationContext, StringSE location, LogFile logFile)
AbstractLoggingSystem
Slf4JLoggingSystem
の loadConfiguration
initializationContext
- ロギング初期化コンテキスト location
- ロードする構成の場所 (非 null
)logFile
- ロードするファイル、またはログファイルが書き込まれない場合は null
protected void reinitialize(LoggingInitializationContext initializationContext)
AbstractLoggingSystem
AbstractLoggingSystem.getSelfInitializationConfig()
が使用され、ログファイルが変更されていないときに呼び出されます。構成の再読み込みに使用できます(たとえば、追加のシステムプロパティを取得するため)。AbstractLoggingSystem
の reinitialize
initializationContext
- ロギング初期化コンテキスト public SetSE<LogLevel> getSupportedLogLevels()
LoggingSystem
LogLevels
のセットを返します。LoggingSystem
の getSupportedLogLevels
public void setLogLevel(StringSE loggerName, LogLevel logLevel)
LoggingSystem
LoggingSystem
の setLogLevel
loggerName
- 設定するロガーの名前(ルートロガーには null
を使用できます)。logLevel
- ログレベル (null
を使用して、ロガーのカスタムレベルを削除し、代わりにデフォルト設定を使用できます)public ListSE<LoggerConfiguration> getLoggerConfigurations()
LoggingSystem
LoggingSystem
のロガーの現在の構成のコレクションを返します。LoggingSystem
の getLoggerConfigurations
public LoggerConfiguration getLoggerConfiguration(StringSE loggerName)
LoggingSystem
LoggingSystem
のロガーの現在の構成を返します。LoggingSystem
の getLoggerConfiguration
loggerName
- ロガーの名前 public RunnableSE getShutdownHandler()
LoggingSystem
Runnable
SE を返します。デフォルトの実装は null
を返し、シャットダウンが不要であることを示します。LoggingSystem
の getShutdownHandler
null
public void cleanUp()
LoggingSystem
Slf4JLoggingSystem
の cleanUp
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.