logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Need advice for class logging
Date Sat, 03 Dec 2005 22:12:47 GMT

On Dec 2, 2005, at 11:27 AM, Rainer Schuetze wrote:

> Hi,
>
> I tried to log different class with e.g. the level "info". But the
> logger logs on the basic level. I've no idea what I'm doing wrong. I
> need somebodies help.

I do not understand what you mean by "basic" level.  Could you  
describe or provide examples what behavior that you are seeing and  
describe what you expected


>
> I've defined the logger as a private static variable in the header  
> file.
> In my CPP file I get the instance of my logger as follow:
>
> log4cxx::LoggerPtr XMLParser::logger =
> log4cxx::LoggerPtr(log4cxx::Logger::getLogger("limez.xml.XMLParser"));
>

Looks okay to me.


> I'm using the DOMConfigurator to configure and defined within the XML
> file the logger as follow:
>
>   <logger name="limez">
>     <level value="info" />
>   </logger>
>
>   <root>
>     <priority value ="debug" />
>     <appender-ref ref="stdout" />
>   </root>
>
> Regards
> Rainer
>

I read this as a fragment of a configuration file that instructs  
log4j that all log request directed to "limez" or child loggers with  
a level of info or higher and log requests not directed to "limez" or  
child loggers with a level of debug of higher will pass the level  
filter.  If a request passes the level filter, it will be processed  
by the appender definition with id="stdout" which must be defined  
elsewhere in the configuration file.


Mime
View raw message