java.lang.Object
org.apache.jena.atlas.logging.LogCtlLog4j2
Additional logging control, for Log4j2 as used by jena-cmds.
This class depends on log4j2-api and also log4j2-core. These are <optional> dependencies for Jena which can use any slf4j provider.
This class is split out from LogCtl to decouple the dependencies.
This class is not used if log4j2 is not used.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum for possible syntax of a Log4j configuration file. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidreconfigureLog4j2fromFile(String filename) Reconfigure log4j2 from a file.static voidreconfigureLog4j2fromFile(String filename, LogCtlLog4j2.SyntaxHint syntaxHint) Reconfigure log4j2 from a file.static voidreconfigureLog4j2fromString(String configString, LogCtlLog4j2.SyntaxHint syntaxHint) Reconfigure log4j2 from a string.static voidresetLogging(InputStream inputStream, String resourceName) Reset logging for log4j2 from a string.static voidresetLogging(InputStream inputStream, LogCtlLog4j2.SyntaxHint syntaxHint) Reset logging for log4j2 from anInputStreamwith the given syntax.static voidresetLogging(String configString) Reset logging for log4j2.
-
Field Details
-
log4j2setup
Default log4j2 setup
-
-
Constructor Details
-
LogCtlLog4j2
public LogCtlLog4j2()
-
-
Method Details
-
resetLogging
Reset logging for log4j2. The string is log4j2.properties format. -
resetLogging
Reset logging for log4j2 from a string. The resourceName is used to determine the syntax. -
resetLogging
Reset logging for log4j2 from anInputStreamwith the given syntax. -
reconfigureLog4j2fromFile
Reconfigure log4j2 from a file.The file syntax is determined by the file extension (".properties" or ".xml").
Existing loggers are reconfigured by this function.
-
reconfigureLog4j2fromFile
Reconfigure log4j2 from a file.The file syntax is determined by the syntax hint.
Existing loggers are reconfigured by this function.
-
reconfigureLog4j2fromString
public static void reconfigureLog4j2fromString(String configString, LogCtlLog4j2.SyntaxHint syntaxHint) Reconfigure log4j2 from a string.The syntax is given by the syntax hint.
Existing loggers are reconfigured by this function.
-