Skip to content
Snippets Groups Projects
Commit 3876f846 authored by ribeaudc's avatar ribeaudc
Browse files

Logging configuration for LIMS service (implementation similar to the DataMover one).

SVN: 238
parent b1f47464
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,12 @@ import org.apache.log4j.xml.DOMConfigurator;
*/
public class LogInitializer
{
static {
// Do not let log4j configure itself. We will do it our own way.
// Look at page 84 of the manual to get to know the default initialization.
System.setProperty("log4j.defaultInitOverride", "true");
}
private static boolean initialized = false;
public static synchronized void init()
......@@ -43,6 +48,7 @@ public class LogInitializer
final File logFile = new File(logDirectory, logFilename);
if (logFile.exists())
{
// For non-XML files, you will use <code>PropertyConfigurator.configureAndWatch(String)</code>
DOMConfigurator.configureAndWatch(logFile.getPath());
} else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment