//--------------------------------------------------------------------------
// Constructors:
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Public Methods:
//--------------------------------------------------------------------------
// Configure the LF5Appender using the DefaultLF5Configurator. This
// will add the LF5Appender to the root of the Category tree.
DefaultLF5Configurator.configure();
// Add an NDC to demonstrate how NDC information is output.
NDC.push("#23856");
// Log some information.
for (int i = 0; i < 10; i++) {
logger.debug("Hello, my name is Homer Simpson.");
logger.info("Mmmmmm .... Chocolate.");
logger.warn("Mmm...forbidden donut.");
}
// Clean up NDC
NDC.pop();
NDC.remove();
NDC.push("Another NDC");
// Log some information.
logger.fatal("Hello, my name is Bart Simpson.");
logger.error("Hi diddly ho good neighbour.");
// Clean up NDC
NDC.pop();
NDC.remove();
// Call methods on both classes.
InitUsingDefaultConfigurator.foo();
InnerInitUsingDefaultConfigurator.foo();
logger.info("Exiting InitUsingDefaultConfigurator.");