|
From: Patrick Y. <kc...@ce...> - 2003-05-27 03:42:56
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
Sorry for belated response. Thanks for your suggestion and we have
added a similar trick (just some property name change) to the nightly
build.<br>
<br>
Regards, -Patrick<br>
<br>
<br>
Mayne, Peter wrote:<br>
<blockquote type="cite"
cite="mid...@s-...">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator"
content="MS Exchange Server version 5.5.2654.45">
<title>RE: [ebxmlms-develop] Logging configuration</title>
<p><font size="2">Well, that turned out to be rather easy. In
Utility.java, replace configureLogger() and configureClientLogger with
the following. (Add a static boolean, make the methods synchronized,
detect "MSH/Log/log4jProperties", leave everything else as is.)</font></p>
<p><font size="2">Can this (or similar) go in the nightly build as
well, please?</font> </p>
<p><font size="2">-- BEGIN --</font> <br>
<font size="2"> static boolean loggingConfigured = false;</font> <br>
<font size="2"> public static synchronized void
configureLogger(Property prop, String umbrella) </font> <br>
<font size="2"> throws InitializationException {</font> </p>
<p><font size="2"> String log4j =
prop.get("MSH/Log/log4jProperties");</font> <br>
<font size="2"> if(log4j!=null)</font> <br>
<font size="2"> {</font> <br>
<font size="2"> if(!loggingConfigured)</font> <br>
<font size="2"> {</font> <br>
<font size="2"> System.err.println("Info: MSH log4j
properties file at " + log4j);</font> <br>
<font size="2">
org.apache.log4j.PropertyConfigurator.configure(log4j);</font> <br>
<font size="2"> loggingConfigured = true;</font> <br>
<font size="2"> }</font> <br>
<font size="2"> return;</font> <br>
<font size="2"> }</font> </p>
<p><font size="2"> String logPath =
prop.get(Constants.PROPERTY_LOG_PATH);</font> <br>
<font size="2"> String logFile =
prop.get(Constants.PROPERTY_LOG_FILE);</font> <br>
<font size="2"> String logLevel =
prop.get(Constants.PROPERTY_LOG_LEVEL);</font> <br>
<font size="2"> String logSize =
prop.get(Constants.PROPERTY_MAX_LOG_SIZE);</font> </p>
<p><font size="2"> setLogger(logPath, logFile, logLevel,
logSize, umbrella);</font> <br>
<font size="2"> }</font> </p>
<p><font size="2"> public static synchronized void
configureClientLogger(Property prop, String umbrella)</font> <br>
<font size="2"> throws InitializationException {</font> </p>
<p><font size="2"> String log4j =
prop.get("MSH/Log/log4jProperties");</font> <br>
<font size="2"> if(log4j!=null)</font> <br>
<font size="2"> {</font> <br>
<font size="2"> if(!loggingConfigured)</font> <br>
<font size="2"> {</font> <br>
<font size="2"> System.err.println("Info: MSH
log4j properties file at " + log4j);</font> <br>
<font size="2">
org.apache.log4j.PropertyConfigurator.configure(log4j);</font> <br>
<font size="2"> loggingConfigured = true;</font> <br>
<font size="2"> }</font> <br>
<font size="2"> return;</font> <br>
<font size="2"> }</font> </p>
<p><font size="2"> String logPath =
prop.get(Constants.PROPERTY_REQUEST_LOG_PATH);</font> <br>
<font size="2"> String logFile =
prop.get(Constants.PROPERTY_REQUEST_LOG_FILE);</font> <br>
<font size="2"> String logLevel =
prop.get(Constants.PROPERTY_REQUEST_LOG_LEVEL);</font> <br>
<font size="2"> String logSize =
prop.get(Constants.PROPERTY_REQUEST_MAX_LOG_SIZE);</font> </p>
<p><font size="2"> setLogger(logPath, logFile, logLevel,
logSize, umbrella);</font> <br>
<font size="2"> }</font> <br>
<font size="2">-- END --</font> </p>
<p><font size="2">PJDM</font> <br>
<font size="2">--</font> <br>
<font size="2">Peter Mayne</font> <br>
<font size="2">Technology Consultant</font> <br>
<font size="2">Spherion Technology Solutions</font> <br>
<font size="2">Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602</font> <br>
<font size="2">T: 61 2 62689727 F: 61 2 62689777</font> </p>
<font size="3" color="BLUE">
<pre>The information contained in this email and any attachments to it:
(a) may be confidential and if you are not the intended recipient, any interference with,
use, disclosure or copying of this material is unauthorised and prohibited; and
(b) may contain personal information of the recipient and/or the sender as defined
under the Privacy Act 1988 (Cth). Consent is hereby given by the recipient(s) to
collect, hold and use such information and any personal information contained in a
response to this email, for any reasonable purpose in the ordinary course of
Spherion's
business, including forwarding this email internally or disclosing it to a third party. All
personal information collected by Spherion will be handled in accordance with
Spherion's Privacy Policy. If you have received this email in error, please notify the
sender and delete it.
(c) you agree not to employ or arrange employment for any candidate(s) supplied in
this email and any attachments without first entering into a contractual agreement with
Spherion. You further agree not to divulge any information contained in this document
to any person(s) or entities without the express permission of Spherion.
</pre>
</font> </blockquote>
</body>
</html>
|