Commit 066912ac authored by Nicolas Tachker's avatar Nicolas Tachker
Browse files

undo the previous commit.

parent 32b8bcb0
/*
* Copyright (C) 2002 - 2010 ScalAgent Distributed Technologies
* Copyright (C) 2002 - 2008 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -121,28 +121,30 @@ public class Debug {
private static void initialize() throws Exception {
String ldebugDir = debugDir;
if (ldebugDir == null)
ldebugDir = System.getProperty(DEBUG_DIR_PROPERTY, DEFAULT_DEBUG_DIR);
ldebugDir = System.getProperty(DEBUG_DIR_PROPERTY);
String ldebugFileName = debugFileName;
if (ldebugFileName == null)
ldebugFileName = System.getProperty(DEBUG_FILE_PROPERTY, DEFAULT_DEBUG_FILE);
try {
ldebugFileName = System.getProperty(DEBUG_FILE_PROPERTY,
DEFAULT_DEBUG_FILE);
if (ldebugDir != null) {
File debugFile = new File(ldebugDir, ldebugFileName);
if (debugFile.exists() && debugFile.isFile() && (debugFile.length() != 0)) {
ldebugFileName = debugFile.getPath();
} else {
throw new IOException();
try {
if (debugFile.exists() && debugFile.isFile() && (debugFile.length() != 0)) {
ldebugFileName = debugFile.getPath();
} else {
throw new IOException();
}
} catch (IOException exc) {
// debug configuration file seems not exist, search it from the
// search path used to load classes.
System.err.println("Unable to find \"" + debugFile.getPath() + "\".");
ldebugDir = null;
}
} catch (IOException exc) {
// debug configuration file seems not exist, search it from the
// search path used to load classes.
System.err.println("Unable to find \"" + ldebugFileName + "\" in " + "\"" + ldebugDir + "\" directory.");
throw exc;
}
try {
System.setProperty(org.objectweb.util.monolog.Monolog.MONOLOG_FILE_NAME, ldebugFileName);
System.setProperty(org.objectweb.util.monolog.Monolog.MONOLOG_FILE_NAME,
ldebugFileName);
factory = org.objectweb.util.monolog.Monolog.initialize();
if (factory == null) {
System.err.println("Error in Monolog initialization: null factory");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment