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 Steven Robertson <st...@fonem.com> on 2002/02/03 12:49:05 UTC

logging only occurs from one package...others ignored.

Hi,

I am having trouble getting log4j to log messages out of separate packages.
I have log4j.jar in the lib\ext directory, and do not call any of the
Configurator classes.  Instead, I am defining

    -Dlog4j.configuration=file:/d:/fonem/dev/bin/log4j.properties -Dlog4j.de
bug

on the commandline and my properties file looks like...

    # Set root category priority
    log4j.rootCategory=DEBUG,STDOUT

    # stdout
    log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
    log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
    log4j.appender.STDOUT.layout.ConversionPattern=%5p [%t] %c{1} - %m%n
    log4j.appender.STDOUT.Threshold=DEBUG

    # change specific categories (classes)
    log4j.category.com.fonem.vbx.db.VBXDatabase=DEBUG
    log4j.category.com.fonem.vbx.vui.VBXIngress=DEBUG

I have no setPriority() calls in the code, yet logging statements in entire
packages are being ignored.  I thought at first that the package that I was
running the program from was the only one being logged, but this is not the
case.  I also moved my 'main' function into a package that was not being
logged... still no joy.  I tried explicitly setting the priorities of the
packages/classes (as per the properties file)... still nothing.  I can see
no difference to the use of log4j in packages that are working correctly,
and those that are not.

Any ideas?

Thanks, Steven.





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: logging only occurs from one package... working correctly now

Posted by Steven Robertson <st...@fonem.com>.
I have this working correctly now... operator error

Thanks, Steven.

> Hi,
>
> I am having trouble getting log4j to log messages out of separate
packages.
> I have log4j.jar in the lib\ext directory, and do not call any of the
> Configurator classes.  Instead, I am defining
>
>     -Dlog4j.configuration=file:/d:/fonem/dev/bin/log4j.properties -Dlog4j.
de
> bug
>
> on the commandline and my properties file looks like...
>
>     # Set root category priority
>     log4j.rootCategory=DEBUG,STDOUT
>
>     # stdout
>     log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
>     log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
>     log4j.appender.STDOUT.layout.ConversionPattern=%5p [%t] %c{1} - %m%n
>     log4j.appender.STDOUT.Threshold=DEBUG
>
>     # change specific categories (classes)
>     log4j.category.com.fonem.vbx.db.VBXDatabase=DEBUG
>     log4j.category.com.fonem.vbx.vui.VBXIngress=DEBUG
>
> I have no setPriority() calls in the code, yet logging statements in
entire
> packages are being ignored.  I thought at first that the package that I
was
> running the program from was the only one being logged, but this is not
the
> case.  I also moved my 'main' function into a package that was not being
> logged... still no joy.  I tried explicitly setting the priorities of the
> packages/classes (as per the properties file)... still nothing.  I can see
> no difference to the use of log4j in packages that are working correctly,
> and those that are not.
>
> Any ideas?
>
> Thanks, Steven.
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: logging only occurs from one package...others ignored.

Posted by Charles Horan <ct...@sympatico.ca>.
I'm sure this is nitpicking but shouldn't the file protocol have two /'s
instead of one ?

ie

file://d:/fonem/dev/bin/log4j.properties

rather than

file:/d:/fonem/dev/bin/log4j.properties



-----Original Message-----
From: Steven Robertson [mailto:steven@fonem.com]
Sent: February 3, 2002 6:49 AM
To: log4j-user@jakarta.apache.org
Subject: logging only occurs from one package...others ignored.


Hi,

I am having trouble getting log4j to log messages out of separate packages.
I have log4j.jar in the lib\ext directory, and do not call any of the
Configurator classes.  Instead, I am defining

    -Dlog4j.configuration=file:/d:/fonem/dev/bin/log4j.properties -Dlog4j.de
bug


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>