have you tryed changing the PropertyConfigurator path to the .lcf file to an
absolute pathname?

ie
public HelloCom( ) {
  PropertyConfigurator.configure("C:/temp/hello.lcf");
 }
----- Original Message -----
From: "bryan hansen" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, February 01, 2002 11:07 AM
Subject: Re: No appender error...


> Wow thanks for all the quick responses, here is the
> simple class and the .lcf file.
>
> Thanks
>
> Bryan
>
> --- Michael Wiwchar <[EMAIL PROTECTED]>
> 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" <[EMAIL PROTECTED]>
> > To: "Log4J Users List"
> > <[EMAIL PROTECTED]>
> > 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]>
> > > > > > For additional commands, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > > >
> > <mailto:[EMAIL PROTECTED]>
> > > > > For additional commands, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > >
> > > >
> > > >
> > > >
> > __________________________________________________
> > > > Do You Yahoo!?
> > > > Great stuff seeking new owners in Yahoo!
> > Auctions!
> > > > http://auctions.yahoo.com
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > >
> > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Great stuff seeking new owners in Yahoo! Auctions!
> > > http://auctions.yahoo.com
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> === message truncated ===
>
>
> __________________________________________________
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions!
> http://auctions.yahoo.com


----------------------------------------------------------------------------
----


> 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
>
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to