Vicente,
 
I have not looked at log4jME in well over a year however,I think that the
root logger property is changed to log4j.rootLogger from log4j.rootCategory.
This may be your problem. Have a look at PropertyConfigurator.java for
further hints on log4jME configuration properties.
 
Good Luck,
Ralph


-----Original Message-----
From: Vicente Ferrer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 26, 2006 7:03 AM
To: [email protected]
Subject: Problem with log4jME


Hello, 

Firstly, I´m sorry for send my question to that list, I don´t know if that´s
the appropiate place but, I think you could help me. 

I´m trying to use log4jMini in a J2ME project. Following the official
instructions, I had download the SVN trunk code and I had compiled it with
the "foundation profile" modificator for the javac compiler. The compilation
ended successfully and I got the "1_3alpha_7" jar version of log4jMini. My
problem is, log4jME always says the same message when I try to log
something: 

log4j:ERROR No appenders could be found for Logger
(es.app.config.PropPreferences).
log4j:ERROR Please initialize the log4j system properly.

I think my log4j.properties is properly configured. Its contents are: 

# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=DEBUG, CONSOLE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender 
log4j.appender.CONSOLE.Threshold=DEBUG
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

And I had read that ConsoleAppender has been replaced with a FileAppender
with " System.out" in File configuration property, like that: 

# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=DEBUG, CONSOLE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout. 
log4j.appender.CONSOLE=org.apache.log4j.FileAppender
log4j.appender.CONSOLE.File=System.out
log4j.appender.CONSOLE.Threshold=DEBUG
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

In all cases, I´m getting the same output message "No appenders could be
found for Logger (es.app.config.PropPreferences)". 

Somebody knows what is the problem? Am I doing something wrong? Should be a
log4jMini error? 

Thanks in advance, 

Vicente Ferrer
Inicom Development Department


Reply via email to