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 Néstor Boscán <ne...@tcs.com.ve> on 2011/09/14 17:05:54 UTC

Log4J not generating DEBUG messages

Hi

I have a log4j.xml file configured so that the classes in my package should
generate ALL messages: When I create a simple test class and log info, warn
and error it works but all debug messages are not generated.

Any ideas?

Regards,

Néstor Boscán

Re: Log4J not generating DEBUG messages

Posted by Jacob Kjome <ho...@visi.com>.
Ahh....  Yes, I didn't notice you had a threshold of "INFO" in your 
ConsoleAppender.  Simply remove that.  I don't see the point of it given the 
rest of your configuration.

Jake

On Wed, 14 Sep 2011 21:59:19 -0400
 "Konduru, Geetha" <Ge...@medco.com> wrote:
>Following may work...
> 
> <appender name="console" class="org.apache.log4j.ConsoleAppender">
> 
>        <param name="Threshold" value="DEBUG"/>
> 
>        <layout class="org.apache.log4j.PatternLayout">
> 
>            <param name="ConversionPattern" value="%d{dd/MMM/yyyy 
>HH:mm:ss.SSSS} %m%n"/>
> 
>        </layout>
> 
>    </appender>
> 
> -----Original Message-----
>From: Néstor Boscán [mailto:nestor.boscan@tcs.com.ve] 
> Sent: Wednesday, September 14, 2011 6:25 PM
> To: Log4J Users List
> Subject: Re: Log4J not generating DEBUG messages
> 
> 
> 
> That was an example. My original package is something like
> 
> ve.com.<company>.<app>.
> 
> That's whats inside package and my class is inside that package.
> 
> 
> 
> Regards,
> 
> 
> 
> Néstor Boscán
> 
> 
> 
> On Wed, Sep 14, 2011 at 5:36 PM, Jacob Kjome <ho...@visi.com> wrote:
> 
> 
> 
>> 
> 
>> "package" is an odd logger name.  How do you name your logger(s)?  You
> 
>> stated the following in your original message: "...so that the classes in my
> 
>> package...".  What package?  A package named "package"?  Name the logger
> 
>> after the actual package name, such as "com.mycompany", rather than the
> 
>> likely non-existent package "package" and you will get the results you
> 
>> expect.
> 
>> 
> 
>> Jake
> 
>> 
> 
>> 
> 
>> On Wed, 14 Sep 2011 16:44:21 -0430
> 
>>  Néstor Boscán <ne...@tcs.com.ve> wrote:
> 
>> 
> 
>>> This is the log4j.xml file:
> 
>>> 
> 
>>> <?xml version="1.0" encoding="UTF-8"?>
> 
>>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> 
>>> <log4j:configuration 
>>>xmlns:log4j="http://jakarta.**apache.org/log4j/<http://jakarta.apache.org/log4j/>
> 
>>> "
> 
>>>                      debug="false">
> 
>>>     <appender name="console" class="org.apache.log4j.**ConsoleAppender">
> 
>>>         <param name="Threshold" value="INFO"/>
> 
>>>         <layout class="org.apache.log4j.**PatternLayout">
> 
>>>             <param name="ConversionPattern" value="%d{dd/MMM/yyyy
> 
>>> HH:mm:ss.SSSS} %m%n"/>
> 
>>>         </layout>
> 
>>>     </appender>
> 
>>>     <logger name="package" additivity="false">
> 
>>>         <level value="all"/>
> 
>>>         <appender-ref ref="console"/>
> 
>>>     </logger>
> 
>>>     <root>
> 
>>>         <level value="error"/>
> 
>>>         <appender-ref ref="console"/>
> 
>>>     </root>
> 
>>> </log4j:configuration>
> 
>>> 
> 
>>> Regards,
> 
>>> 
> 
>>> Néstor Boscán
> 
>>> 
> 
>>> On Wed, Sep 14, 2011 at 10:37 AM, Konduru, Geetha
> 
>>> <Ge...@medco.com>**wrote:
> 
>>> 
> 
>>>  Would you please send the configuration...
> 
>>>> 
> 
>>>> -----Original Message-----
> 
>>>> From: Néstor Boscán 
>>>>[mailto:nestor.boscan@tcs.com.**ve<ne...@tcs.com.ve>
> 
>>>> ]
> 
>>>> Sent: Wednesday, September 14, 2011 11:06 AM
> 
>>>> To: log4j-user@logging.apache.org
> 
>>>> Subject: Log4J not generating DEBUG messages
> 
>>>> 
> 
>>>> Hi
> 
>>>> 
> 
>>>> I have a log4j.xml file configured so that the classes in my package
> 
>>>> should
> 
>>>> generate ALL messages: When I create a simple test class and log info,
> 
>>>> warn
> 
>>>> and error it works but all debug messages are not generated.
> 
>>>> 
> 
>>>> Any ideas?
> 
>>>> 
> 
>>>> Regards,
> 
>>>> 
> 
>>>> Néstor Boscán
> 
>>>> 
> 
>>>> ****************************************************************
> 
>>>> **********
> 
>>>> This e-mail message and any attachments contain confidential information
> 
>>>> from Medco. If you are not the intended recipient, you are hereby
> 
>>>> notified
> 
>>>> that disclosure, printing, copying, distribution, or the taking of any
> 
>>>> action in reliance on the contents of this electronic information is
> 
>>>> strictly prohibited. If you have received this e-mail message in error,
> 
>>>> please immediately notify the sender by reply message and then delete the
> 
>>>> electronic message and any attachments.
> 
>>>> 
> 
>>>> ------------------------------**------------------------------**
> 
>>>> ---------
> 
>>>> To unsubscribe, e-mail: 
>>>>log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>
> 
>>>> For additional commands, e-mail: 
>>>>log4j-user-help@logging.**apache.org<lo...@logging.apache.org>
> 
>>>> 
> 
>>>> 
> 
>>>> 
> 
>> 
> 
>> ------------------------------**------------------------------**---------
> 
>> To unsubscribe, e-mail: 
>>log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>
> 
>> For additional commands, e-mail: 
>>log4j-user-help@logging.**apache.org<lo...@logging.apache.org>
> 
>> 
> 
>> 
> 
> **********************************************************************
> This e-mail message and any attachments contain confidential information 
>from Medco. If you are not the intended recipient, you are hereby notified 
>that disclosure, printing, copying, distribution, or the taking of any action 
>in reliance on the contents of this electronic information is strictly 
>prohibited. If you have received this e-mail message in error, please 
>immediately notify the sender by reply message and then delete the electronic 
>message and any attachments.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: Log4J not generating DEBUG messages

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Following may work...

<appender name="console" class="org.apache.log4j.ConsoleAppender">

        <param name="Threshold" value="DEBUG"/>

        <layout class="org.apache.log4j.PatternLayout">

            <param name="ConversionPattern" value="%d{dd/MMM/yyyy HH:mm:ss.SSSS} %m%n"/>

        </layout>

    </appender>

-----Original Message-----
From: Néstor Boscán [mailto:nestor.boscan@tcs.com.ve] 
Sent: Wednesday, September 14, 2011 6:25 PM
To: Log4J Users List
Subject: Re: Log4J not generating DEBUG messages

 

That was an example. My original package is something like

ve.com.<company>.<app>.

That's whats inside package and my class is inside that package.

 

Regards,

 

Néstor Boscán

 

On Wed, Sep 14, 2011 at 5:36 PM, Jacob Kjome <ho...@visi.com> wrote:

 

> 

> "package" is an odd logger name.  How do you name your logger(s)?  You

> stated the following in your original message: "...so that the classes in my

> package...".  What package?  A package named "package"?  Name the logger

> after the actual package name, such as "com.mycompany", rather than the

> likely non-existent package "package" and you will get the results you

> expect.

> 

> Jake

> 

> 

> On Wed, 14 Sep 2011 16:44:21 -0430

>  Néstor Boscán <ne...@tcs.com.ve> wrote:

> 

>> This is the log4j.xml file:

>> 

>> <?xml version="1.0" encoding="UTF-8"?>

>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

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

>> "

>>                      debug="false">

>>     <appender name="console" class="org.apache.log4j.**ConsoleAppender">

>>         <param name="Threshold" value="INFO"/>

>>         <layout class="org.apache.log4j.**PatternLayout">

>>             <param name="ConversionPattern" value="%d{dd/MMM/yyyy

>> HH:mm:ss.SSSS} %m%n"/>

>>         </layout>

>>     </appender>

>>     <logger name="package" additivity="false">

>>         <level value="all"/>

>>         <appender-ref ref="console"/>

>>     </logger>

>>     <root>

>>         <level value="error"/>

>>         <appender-ref ref="console"/>

>>     </root>

>> </log4j:configuration>

>> 

>> Regards,

>> 

>> Néstor Boscán

>> 

>> On Wed, Sep 14, 2011 at 10:37 AM, Konduru, Geetha

>> <Ge...@medco.com>**wrote:

>> 

>>  Would you please send the configuration...

>>> 

>>> -----Original Message-----

>>> From: Néstor Boscán [mailto:nestor.boscan@tcs.com.**ve<ne...@tcs.com.ve>

>>> ]

>>> Sent: Wednesday, September 14, 2011 11:06 AM

>>> To: log4j-user@logging.apache.org

>>> Subject: Log4J not generating DEBUG messages

>>> 

>>> Hi

>>> 

>>> I have a log4j.xml file configured so that the classes in my package

>>> should

>>> generate ALL messages: When I create a simple test class and log info,

>>> warn

>>> and error it works but all debug messages are not generated.

>>> 

>>> Any ideas?

>>> 

>>> Regards,

>>> 

>>> Néstor Boscán

>>> 

>>> ****************************************************************

>>> **********

>>> This e-mail message and any attachments contain confidential information

>>> from Medco. If you are not the intended recipient, you are hereby

>>> notified

>>> that disclosure, printing, copying, distribution, or the taking of any

>>> action in reliance on the contents of this electronic information is

>>> strictly prohibited. If you have received this e-mail message in error,

>>> please immediately notify the sender by reply message and then delete the

>>> electronic message and any attachments.

>>> 

>>> ------------------------------**------------------------------**

>>> ---------

>>> To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>

>>> For additional commands, e-mail: log4j-user-help@logging.**apache.org<lo...@logging.apache.org>

>>> 

>>> 

>>> 

> 

> ------------------------------**------------------------------**---------

> To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>

> For additional commands, e-mail: log4j-user-help@logging.**apache.org<lo...@logging.apache.org>

> 

> 

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

Re: Log4J not generating DEBUG messages

Posted by Néstor Boscán <ne...@tcs.com.ve>.
That was an example. My original package is something like
ve.com.<company>.<app>.
That's whats inside package and my class is inside that package.

Regards,

Néstor Boscán

On Wed, Sep 14, 2011 at 5:36 PM, Jacob Kjome <ho...@visi.com> wrote:

>
> "package" is an odd logger name.  How do you name your logger(s)?  You
> stated the following in your original message: "...so that the classes in my
> package...".  What package?  A package named "package"?  Name the logger
> after the actual package name, such as "com.mycompany", rather than the
> likely non-existent package "package" and you will get the results you
> expect.
>
> Jake
>
>
> On Wed, 14 Sep 2011 16:44:21 -0430
>  Néstor Boscán <ne...@tcs.com.ve> wrote:
>
>> This is the log4j.xml file:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>> <log4j:configuration xmlns:log4j="http://jakarta.**apache.org/log4j/<http://jakarta.apache.org/log4j/>
>> "
>>                      debug="false">
>>     <appender name="console" class="org.apache.log4j.**ConsoleAppender">
>>         <param name="Threshold" value="INFO"/>
>>         <layout class="org.apache.log4j.**PatternLayout">
>>             <param name="ConversionPattern" value="%d{dd/MMM/yyyy
>> HH:mm:ss.SSSS} %m%n"/>
>>         </layout>
>>     </appender>
>>     <logger name="package" additivity="false">
>>         <level value="all"/>
>>         <appender-ref ref="console"/>
>>     </logger>
>>     <root>
>>         <level value="error"/>
>>         <appender-ref ref="console"/>
>>     </root>
>> </log4j:configuration>
>>
>> Regards,
>>
>> Néstor Boscán
>>
>> On Wed, Sep 14, 2011 at 10:37 AM, Konduru, Geetha
>> <Ge...@medco.com>**wrote:
>>
>>  Would you please send the configuration...
>>>
>>> -----Original Message-----
>>> From: Néstor Boscán [mailto:nestor.boscan@tcs.com.**ve<ne...@tcs.com.ve>
>>> ]
>>> Sent: Wednesday, September 14, 2011 11:06 AM
>>> To: log4j-user@logging.apache.org
>>> Subject: Log4J not generating DEBUG messages
>>>
>>> Hi
>>>
>>> I have a log4j.xml file configured so that the classes in my package
>>> should
>>> generate ALL messages: When I create a simple test class and log info,
>>> warn
>>> and error it works but all debug messages are not generated.
>>>
>>> Any ideas?
>>>
>>> Regards,
>>>
>>> Néstor Boscán
>>>
>>> ****************************************************************
>>> **********
>>> This e-mail message and any attachments contain confidential information
>>> from Medco. If you are not the intended recipient, you are hereby
>>> notified
>>> that disclosure, printing, copying, distribution, or the taking of any
>>> action in reliance on the contents of this electronic information is
>>> strictly prohibited. If you have received this e-mail message in error,
>>> please immediately notify the sender by reply message and then delete the
>>> electronic message and any attachments.
>>>
>>> ------------------------------**------------------------------**
>>> ---------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>
>>> For additional commands, e-mail: log4j-user-help@logging.**apache.org<lo...@logging.apache.org>
>>>
>>>
>>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>
> For additional commands, e-mail: log4j-user-help@logging.**apache.org<lo...@logging.apache.org>
>
>

Re: Log4J not generating DEBUG messages

Posted by Jacob Kjome <ho...@visi.com>.
"package" is an odd logger name.  How do you name your logger(s)?  You stated 
the following in your original message: "...so that the classes in my 
package...".  What package?  A package named "package"?  Name the logger after 
the actual package name, such as "com.mycompany", rather than the likely 
non-existent package "package" and you will get the results you expect.

Jake

On Wed, 14 Sep 2011 16:44:21 -0430
 Néstor Boscán <ne...@tcs.com.ve> wrote:
> This is the log4j.xml file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
>                     debug="false">
>    <appender name="console" class="org.apache.log4j.ConsoleAppender">
>        <param name="Threshold" value="INFO"/>
>        <layout class="org.apache.log4j.PatternLayout">
>            <param name="ConversionPattern" value="%d{dd/MMM/yyyy
> HH:mm:ss.SSSS} %m%n"/>
>        </layout>
>    </appender>
>    <logger name="package" additivity="false">
>        <level value="all"/>
>        <appender-ref ref="console"/>
>    </logger>
>    <root>
>        <level value="error"/>
>        <appender-ref ref="console"/>
>    </root>
> </log4j:configuration>
> 
> Regards,
> 
> Néstor Boscán
> 
> On Wed, Sep 14, 2011 at 10:37 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
> 
>> Would you please send the configuration...
>>
>> -----Original Message-----
>> From: Néstor Boscán [mailto:nestor.boscan@tcs.com.ve]
>> Sent: Wednesday, September 14, 2011 11:06 AM
>> To: log4j-user@logging.apache.org
>> Subject: Log4J not generating DEBUG messages
>>
>> Hi
>>
>> I have a log4j.xml file configured so that the classes in my package should
>> generate ALL messages: When I create a simple test class and log info, warn
>> and error it works but all debug messages are not generated.
>>
>> Any ideas?
>>
>> Regards,
>>
>> Néstor Boscán
>>
>> **********************************************************************
>> This e-mail message and any attachments contain confidential information
>> from Medco. If you are not the intended recipient, you are hereby notified
>> that disclosure, printing, copying, distribution, or the taking of any
>> action in reliance on the contents of this electronic information is
>> strictly prohibited. If you have received this e-mail message in error,
>> please immediately notify the sender by reply message and then delete the
>> electronic message and any attachments.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log4J not generating DEBUG messages

Posted by Néstor Boscán <ne...@tcs.com.ve>.
This is the log4j.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
                     debug="false">
    <appender name="console" class="org.apache.log4j.ConsoleAppender">
        <param name="Threshold" value="INFO"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{dd/MMM/yyyy
HH:mm:ss.SSSS} %m%n"/>
        </layout>
    </appender>
    <logger name="package" additivity="false">
        <level value="all"/>
        <appender-ref ref="console"/>
    </logger>
    <root>
        <level value="error"/>
        <appender-ref ref="console"/>
    </root>
</log4j:configuration>

Regards,

Néstor Boscán

On Wed, Sep 14, 2011 at 10:37 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Would you please send the configuration...
>
> -----Original Message-----
> From: Néstor Boscán [mailto:nestor.boscan@tcs.com.ve]
> Sent: Wednesday, September 14, 2011 11:06 AM
> To: log4j-user@logging.apache.org
> Subject: Log4J not generating DEBUG messages
>
> Hi
>
> I have a log4j.xml file configured so that the classes in my package should
> generate ALL messages: When I create a simple test class and log info, warn
> and error it works but all debug messages are not generated.
>
> Any ideas?
>
> Regards,
>
> Néstor Boscán
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: Log4J not generating DEBUG messages

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Would you please send the configuration...

-----Original Message-----
From: Néstor Boscán [mailto:nestor.boscan@tcs.com.ve] 
Sent: Wednesday, September 14, 2011 11:06 AM
To: log4j-user@logging.apache.org
Subject: Log4J not generating DEBUG messages

Hi

I have a log4j.xml file configured so that the classes in my package should
generate ALL messages: When I create a simple test class and log info, warn
and error it works but all debug messages are not generated.

Any ideas?

Regards,

Néstor Boscán

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org