|
From: Bob K. <bob...@us...> - 2004-10-21 10:37:35
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17371/src/hk/hku/cecid/phoenix/message/handler Modified Files: Utility.java MSHServletContextListener.java MessageServiceHandler.java Log Message: Fix the problem that the msh log file will not make new file when file size exist. The problem is due to log config on both "hk.hku.cecid.phoenix.message" and "hk.hku.cecid.phoenix.pki" umbrella. It is fixed by config only "hk.hku.cecid.phoenix" umbrella. Index: Utility.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Utility.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Utility.java 11 Dec 2003 06:41:29 -0000 1.23 --- Utility.java 21 Oct 2004 10:37:18 -0000 1.24 *************** *** 79,84 **** --- 79,87 ---- import java.util.Date; import java.util.Iterator; + import java.util.List; import java.util.Properties; import java.util.TimeZone; + import java.util.Vector; + import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; *************** *** 127,130 **** --- 130,135 ---- private static boolean loggingConfigured = false; + private static List umbrellas = new Vector(); + // Set up message counter private static void init() { *************** *** 536,539 **** --- 541,549 ---- } + if (umbrellas.contains(umbrella)) { + return; + } + umbrellas.add(umbrella); + // Assure the logpath directory exists File logPathDirectory = new File (logPath); *************** *** 576,580 **** maxFileSize = -1; } - Properties property = new Properties(); property.setProperty("log4j.logger." + umbrella, --- 586,589 ---- *************** *** 600,603 **** --- 609,613 ---- property.setProperty("log4j.appender." + umbrella + ".layout.ConversionPattern", "%d %-5p [%t]: %m%n"); + property.setProperty("log4j.additivity." + umbrella, "false"); PropertyConfigurator.configure(property); } Index: MSHServletContextListener.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MSHServletContextListener.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** MSHServletContextListener.java 9 Apr 2003 07:47:48 -0000 1.21 --- MSHServletContextListener.java 21 Oct 2004 10:37:18 -0000 1.22 *************** *** 103,108 **** if (isConfigured) return; ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix.message"); ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix.pki"); release = MessageServiceHandler.getMetaData().getRelease(); isConfigured = true; --- 103,109 ---- if (isConfigured) return; ! //Utility.configureLogger(prop, "hk.hku.cecid.phoenix.message"); ! //Utility.configureLogger(prop, "hk.hku.cecid.phoenix.pki"); ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix"); release = MessageServiceHandler.getMetaData().getRelease(); isConfigured = true; Index: MessageServiceHandler.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v retrieving revision 1.192 retrieving revision 1.193 diff -C2 -d -r1.192 -r1.193 *** MessageServiceHandler.java 21 Oct 2004 03:08:27 -0000 1.192 --- MessageServiceHandler.java 21 Oct 2004 10:37:18 -0000 1.193 *************** *** 953,958 **** // Load logger settings ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix.message"); ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix.pki"); // Load proxy settings --- 953,959 ---- // Load logger settings ! //Utility.configureLogger(prop, "hk.hku.cecid.phoenix.message"); ! //Utility.configureLogger(prop, "hk.hku.cecid.phoenix.pki"); ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix"); // Load proxy settings |