Fixed log configuration.
This commit is contained in:
parent
7a7704fc12
commit
a7d1f43f28
@ -21,6 +21,7 @@ package org.april.agirstatool;
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.log4j.BasicConfigurator;
|
||||
import org.apache.log4j.PropertyConfigurator;
|
||||
import org.april.agirstatool.cli.AgiStatoolCLI;
|
||||
import org.april.agirstatool.demo.AgirStatool;
|
||||
@ -59,7 +60,7 @@ public final class AgirStatoolLauncher
|
||||
}
|
||||
else
|
||||
{
|
||||
// BasicConfigurator.configure();
|
||||
BasicConfigurator.configure();
|
||||
// logger.info("Basic log configuration done.");
|
||||
// logger.info("Configuration file was not found in [{}].",
|
||||
// loggerConfig.getAbsoluteFile());
|
||||
|
@ -86,8 +86,9 @@ public final class AgiStatoolCLI
|
||||
else
|
||||
{
|
||||
BasicConfigurator.configure();
|
||||
logger.info("Basic log configuration done.");
|
||||
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
|
||||
// logger.info("Basic log configuration done.");
|
||||
// logger.info("Configuration file was not found in [{}].",
|
||||
// loggerConfig.getAbsoluteFile());
|
||||
}
|
||||
|
||||
// Run.
|
||||
@ -175,9 +176,12 @@ public final class AgiStatoolCLI
|
||||
{
|
||||
// Apply -c parameter.
|
||||
File log4jfile = new File(configurationFile.getParentFile(), "log4j.properties");
|
||||
if (log4jfile.exists())
|
||||
{
|
||||
logger.info("Applying configuration file found in [{}].", log4jfile.getAbsoluteFile());
|
||||
PropertyConfigurator.configure(log4jfile.getAbsolutePath());
|
||||
logger.info("Configuration log configuration done.");
|
||||
}
|
||||
|
||||
switch (command)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user