Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
066912ac
Commit
066912ac
authored
Mar 03, 2011
by
Nicolas Tachker
Browse files
undo the previous commit.
parent
32b8bcb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
joram/a3/common/src/main/java/fr/dyade/aaa/common/Debug.java
View file @
066912ac
/*
* Copyright (C) 2002 - 20
1
0 ScalAgent Distributed Technologies
* Copyright (C) 2002 - 200
8
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"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment