Package org.apache.log4j
Class BasicConfigurator
java.lang.Object
org.apache.log4j.BasicConfigurator
Configures the package.
For file based configuration, see PropertyConfigurator. For XML based configuration, see
DOMConfigurator.
- Since:
- 0.8.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds aConsoleAppenderthat usesPatternLayoutusing thePatternLayout.TTCC_CONVERSION_PATTERNand prints toSystem.outto the root category.static voidAddsappenderto the root category.static voidResets the default hierarchy to its default.
-
Constructor Details
-
BasicConfigurator
protected BasicConfigurator()Constructs a new instance.
-
-
Method Details
-
configure
public static void configure()Adds aConsoleAppenderthat usesPatternLayoutusing thePatternLayout.TTCC_CONVERSION_PATTERNand prints toSystem.outto the root category. -
configure
Addsappenderto the root category.- Parameters:
appender- The appender to add to the root category.
-
resetConfiguration
public static void resetConfiguration()Resets the default hierarchy to its default. It is equivalent to callingCategory.getDefaultHierarchy().resetConfiguration(). SeeHierarchy.resetConfiguration()for more details.
-