From: Anthony E. <me...@an...> - 2002-01-14 20:29:48
|
Make sure that the following line is in your main() method: LogManager.setLoggerClassName("com.anthonyeden.lib.log.Log4JLogger"); It should really be the very first line in the main() method. The default logger is actually just a System.out logger and it does not understand property file configuration. I am considering making Log4J the default logger in the LogManager...what do you think? Sincerely, Anthony Eden > -----Original Message----- > From: for...@li... > [mailto:for...@li...]On Behalf Of Eric > Beaumier > Sent: Monday, January 14, 2002 3:06 PM > To: for...@li... > Subject: [FormProc-developer] Log4J & LogManager in FormProc > > > > > Hi Anthony, > > I sent you a mail at your personnal email regarding a problem (I > think) with > your LogManager in the EdenLib. > > When I load the properties file, I have traced it and I'm > sure it's the good one, I have remarked the type of logging is not > respected. Example, here the rootCategory must log ERROR, but all > the DEBUG message appears again at the console ... Have you an idea > for this problem. > > > > log.properties > ================================================================ > # Set root category > log4j.rootCategory=ERROR,A1 > > # A1 is set to be a ConsoleAppender which outputs to System.out. > log4j.appender.A1=org.apache.log4j.ConsoleAppender > > # A1 uses PatternLayout. > log4j.appender.A1.layout=org.apache.log4j.PatternLayout > log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n > ================================================================ > > > > ExampleApp.java > ================================================================ > if(logPropertiesFile.exists()){ > // Exist and good one (log.properties) > PropertyConfigurator.configure(logPropertiesFile.getAbsolutePath()); > } else { > BasicConfigurator.configure(); > } > > . . . > > ==================================================================== > > > > > > Console > ==================================================================== > [DEBUG]:org.formproc.FormManager - Loading formproc configuration > [DEBUG]:org.formproc.FormConfiguration - Loading form configuration > [DEBUG]:org.formproc.FormConfiguration - Element name found. > [DEBUG]:org.formproc.FormElement - Validator type expression. > [DEBUG]:org.formproc.FormElement - Configuring validator. > [DEBUG]:org.formproc.FormConfiguration - Element username found. > [DEBUG]:org.formproc.FormElement - Validator type class. > [DEBUG]:org.formproc.FormElement - Creating Java class validator. > [DEBUG]:org.formproc.FormConfiguration - Element age found. > [DEBUG]:org.formproc.FormElement - Validator type rule. > [DEBUG]:org.formproc.FormElement - Configuring validator. > [DEBUG]:org.formproc.FormConfiguration - Element password found. > [DEBUG]:org.formproc.FormElement - Validator type script. > [DEBUG]:org.formproc.FormElement - Configuring validator. > [DEBUG]:org.formproc.FormConfiguration - Form configuration > loaded for form > example > [DEBUG]:com.anthonyeden.lib.resource.ResourceFileMonitor - Starting > FileMonitor > [DEBUG]:org.formproc.FormManager - Formproc configuration loaded > [DEBUG]:com.anthonyeden.lib.resource.ResourceFileMonitor - FileMonitor > running. > > > > > > Thanks. > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > _______________________________________________ > FormProc-developer mailing list > For...@li... > https://lists.sourceforge.net/lists/listinfo/formproc-developer > |