Fix default log configuration.
This commit is contained in:
parent
218588dd2f
commit
22e7957310
@ -22,6 +22,8 @@ import java.io.File;
|
|||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.log4j.BasicConfigurator;
|
import org.apache.log4j.BasicConfigurator;
|
||||||
|
import org.apache.log4j.ConsoleAppender;
|
||||||
|
import org.apache.log4j.EnhancedPatternLayout;
|
||||||
import org.apache.log4j.PropertyConfigurator;
|
import org.apache.log4j.PropertyConfigurator;
|
||||||
import org.april.agirstatool.cli.AgiStatoolCLI;
|
import org.april.agirstatool.cli.AgiStatoolCLI;
|
||||||
import org.april.agirstatool.demo.AgirStatool;
|
import org.april.agirstatool.demo.AgirStatool;
|
||||||
@ -51,7 +53,7 @@ public final class AgirStatoolLauncher
|
|||||||
public static void main(final String[] args)
|
public static void main(final String[] args)
|
||||||
{
|
{
|
||||||
// Configure log.
|
// Configure log.
|
||||||
File loggerConfig = new File("log4j.properties");
|
File loggerConfig = new File("log4j.peroperties");
|
||||||
if (loggerConfig.exists())
|
if (loggerConfig.exists())
|
||||||
{
|
{
|
||||||
PropertyConfigurator.configure(loggerConfig.getAbsolutePath());
|
PropertyConfigurator.configure(loggerConfig.getAbsolutePath());
|
||||||
@ -60,7 +62,7 @@ public final class AgirStatoolLauncher
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BasicConfigurator.configure();
|
BasicConfigurator.configure(new ConsoleAppender(new EnhancedPatternLayout("%m%n")));
|
||||||
// logger.info("Basic log configuration done.");
|
// logger.info("Basic log configuration done.");
|
||||||
// logger.info("Configuration file was not found in [{}].",
|
// logger.info("Configuration file was not found in [{}].",
|
||||||
// loggerConfig.getAbsoluteFile());
|
// loggerConfig.getAbsoluteFile());
|
||||||
|
Loading…
Reference in New Issue
Block a user