logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Can't create appender under Redhat Enterprise Server (k 2.4): msg#00033

apache.logging.log4cxx.user

Subject: Can't create appender under Redhat Enterprise Server (k 2.4)

I am developing a cross platform system using Log4Cxx, CppUnit, Boost and
STLPort. Under Linux I'm using Gcc 3.3.4 and under Windows VC7.1.
Under Windows it all works pretty well, after some sleepless nights, but under
Linux, Log4Cxx can't find any of the Appenders. I've trimmed the program down
to just Log4Cxx, and still no go. I trimmed the Config file down to the root
logger, my logger, and two appenders, a FileAppender and the ConsoleAppender
using the DOMConfigurator.

I turned on Internal debugging and added some LogLogs to try and figure out
what is going on (see below, I trimmed out my mesages), and what I see is the
there are no appenders in the registry map, but they get added after I ask for
them. Even so, I can't create appenders (I hoped that after getting them into
the registry, things would work out, but no dice.)

Could not find configuration file: [log4j.properties].
DOMConfigurator configuring file logging.xml...
debug attribute= "".
Ignoring debug attribute.
Threshold ="".
Retreiving an instance of Logger.
Setting [ALogger] additivity to [true].
Level value for ALogger is [debug].
OptionConverter::toLevel: no class name specified, level=[debug]
ALogger level set to DEBUG
Class name: [org.apache.log4j.FileAppender]
Could not create an Appender. Reported error follows.
Class 'org.apache.log4j.FileAppender' not found
Appender named [File] not found.
Level value for root is [warn].
OptionConverter::toLevel: no class name specified, level=[warn]
root level set to WARN
Class name: [org.apache.log4j.ConsoleAppender]
Could not create an Appender. Reported error follows.
Class 'org.apache.log4j.ConsoleAppender' not found
Appender named [stderr] not found.
No appenders could be found for logger (ALogger).
Please initialize the log4cxx system properly.

Config File:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

<appender name="stderr" class="org.apache.log4j.ConsoleAppender">
<param name="target" value="System.err"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d %r [%t] %p %c{3} (%F:%L) - %m%n"/>
</layout>
</appender>

<appender name="File" class="org.apache.log4j.FileAppender">
<param name="File" value="FileAppender.log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d %r [%t] %p %c{3} (%F:%L) - %m%n"/>
</layout>
</appender>

<logger name="ALogger" additivity="true">
<level value="debug"/>
<appender-ref ref="File"/>
</logger>

<root>
<level value="warn"/>
<appender-ref ref="stderr"/>
</root>

</log4j:configuration>



<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo