You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Thanh Duong <du...@web.de> on 2002/02/06 12:06:34 UTC
RE: No appender error... NEED HELP
Hi,
I got the same error message, but only on Solaris, on Windows the log4j is
working well.
Do you habe any idee?
The log4j.properties is defined in /WEB-INF/classes
and I did use neither the BasicConfigurator.configure() nor the
PropertyConfigurator().
log4j:ERROR No appenders could be found for category (cms.taglib.topB
anner).
log4j:ERROR Please initialize the log4j system properly.
Thanks for help
Thanh
-----Original Message-----
From: bryan hansen [mailto:bh5k@yahoo.com]
Sent: Freitag, 1. Februar 2002 17:27
To: Log4J Users List
Subject: Re: No appender error...
Ok I knew it was probably something simple and stupid
on my behalf...and it was. I was initializing the
.configure() in my constructor ... well the main
method gets called before the constructor, and i don't
need to explain constructors, but the constructor
might not eve get called at all. So basically it was
not initialized, but was tehn getting initialized
halfway through...
Sorry for the spent brain cycles ;)
Bryan
--- Michael Wiwchar <michaelwiwchar@hotmail.com>
wrote:
> Could you send in an example of the code you are
> using inside your java
> class that relates to your PropertyConfigurator
>
>
> ----- Original Message -----
> From: "bryan hansen" <bh5k@yahoo.com>
> To: "Log4J Users List"
> <log4j-user@jakarta.apache.org>
> Sent: Friday, February 01, 2002 10:54 AM
> Subject: Re: No appender error...
>
>
> > Ok I am confused (obviously) I searched my entire
> > system and can not find a log4j.properties file
> except
> > in my jboss stuff. Is there supposed to be one
> with
> > that ships with the code? I have defined my own
> that
> > is used in the example and from the output it
> looks
> > like it is finding my .lcf (properties file) so
> why is
> > it looking for a different one?
> >
> > Thanks,
> >
> > Bryan
> >
> > --- bryan hansen <bh5k@yahoo.com> wrote:
> > > Ahh ha, this did show the error, looks like it
> can't
> > > find the log4j.properties file
> > >
> > > log4j: Trying to find [log4j.properties] using
> > > sun.misc.Launcher$AppClassLoader@71732b class
> > > loader.
> > > log4j: Trying to find [log4j.properties] using
> > > ClassLoader.getSystemResource().
> > > log4j: Could not find resource:
> [log4j.properties].
> > > log4j:ERROR No appenders could be found for
> category
> > > (com.log.test.HelloTest).
> > > log4j:ERROR Please initialize the log4j system
> > > properly.
> > > log4j: Parsing for [root] with value=[DEBUG,
> A1].
> > > log4j: Priority token is [DEBUG].
> > >
> > >
> > > --- Scott Farquhar <scott@atlassian.com> wrote:
> > > > Bryan,
> > > >
> > > > Try starting you application with debugging
> > > > information turned on.
> > > >
> > > > java -Dlog4j.debug=true a.c.b
> > > >
> > > > This will give you more information about
> whether
> > > > log4j is finding the
> > > > config file or not.
> > > >
> > > > Cheers,
> > > > Scott
> > > >
> > > > bryan hansen wrote:
> > > >
> > > > > Sorry if this gets hashed over, but I am new
> to
> > > > log4j
> > > > > and tore apart one of the examples.
> Everything
> > > > works
> > > > > fine except that I get this error message
> when I
> > > > run
> > > > > my sample app:
> > > > >
> > > > > log4j:ERROR No appenders could be found for
> > > > category
> > > > > (com.log.test.HelloTest).
> > > > > log4j:ERROR Please initialize the log4j
> system
> > > > > properly.
> > > > >
> > > > > I don't see that I am really doing anything
> > > > different
> > > > > than the shipped examples, but was wondering
> if
> > > it
> > > > > picks something up in the classpath that I
> am
> > > not
> > > > > finding? I am using this properties file:
> > > > >
> > > > > log4j.rootCategory=DEBUG, 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
> > > > >
> > > > > # The conversion pattern uses format
> specifiers.
> > > > You
> > > > > might want to
> > > > > # change the pattern an watch the output
> layout
> > > > > change.
> > > > >
> log4j.appender.A1.layout.ConversionPattern=%-4r
> > > > %-5p
> > > > > [%t] %37c %3x - %m%n
> > > > >
> > > > > # In this example, we are not really
> interested
> > > in
> > > > > INNER loop or SWAP
> > > > > # messages. Try changing the priorities of
> these
> > > > > categories.
> > > > > # log4j.category.com=ERROR
> > > > > # log4j.category.SortAlgo.SWAP=DEBUG
> > > > > # log4j.category.SortAlgo.DUMP=ERROR
> > > > >
> > > > >
> > >
> __________________________________________________
> > > > > Do You Yahoo!?
> > > > > Great stuff seeking new owners in Yahoo!
> > > Auctions!
> > > >
> > > > > http://auctions.yahoo.com
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > >
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> > > > > For additional commands, e-mail:
> > > > <mailto:log4j-user-help@jakarta.apache.org>
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > >
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > > <mailto:log4j-user-help@jakarta.apache.org>
> > > >
> > >
> > >
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Great stuff seeking new owners in Yahoo!
> Auctions!
> > > http://auctions.yahoo.com
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <mailto:log4j-user-help@jakarta.apache.org>
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Great stuff seeking new owners in Yahoo! Auctions!
> > http://auctions.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:log4j-user-help@jakarta.apache.org>
> >
> >
>
> --
> To unsubscribe, e-mail:
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:log4j-user-help@jakarta.apache.org>
>
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com
--
To unsubscribe, e-mail:
<mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:log4j-user-help@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>