logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Kjome" <h...@visi.com>
Subject Re: Log4j and unique message identities
Date Tue, 02 Jun 2009 14:12:18 GMT
Doesn't SLF4J support MDC in its interfaces?  Just start using that.  And for 
code that continues to use the commons-logging API, you can use the slf4j over 
commons-logging module and the slf4j Log4j module to bind to Log4j.

Jake


On Tue, 02 Jun 2009 09:05:19 -0400
  Captain Haddock <davidg@progress.com> wrote:
> Can't do that without importing log4j or using reflection   :(
> 
> Would like to use log4j but may be restricted to commons-logging in places 
>by other factors.
> 
> Yair Ogen wrote:
>> why not point commons-logging to log4j and use the log4j API for this?
>> 
>> On Tue, Jun 2, 2009 at 3:05 PM, Captain Haddock <davidg@progress.com> wrote:
>> 
>>> Thanks Yair
>>>
>>> That will work for log4j.
>>>
>>> Don't see any equivalent in commons-logging .. any thoughts there anyone?
>>>
>>>
>>> Yair Ogen wrote:
>>>
>>>> We use a transaction id which we put in MDC and print using the
>>>> %X{MDC_KEY}
>>>> notation in the conversion pattern.
>>>>
>>>> On Tue, Jun 2, 2009 at 12:57 AM, David Grigglestone <davidg@progress.com
>>>>> wrote:
>>>>  Maybe I'm missing something in the API but I don't see API support for
>>>>> associating a unique (e.g. numeric) identifier to a message.
>>>>>
>>>>> Unique message identifiers are useful in production systems to allow:
>>>>>
>>>>>  * Easy message identification irrespective of localization
>>>>>  * A key on which JIRA or knowledge base issues can be based
>>>>>  * A key from which automated management actions can be triggered
>>>>>
>>>>> The best I can think of is embedding such an identifier in a message,
>>>>> e.g.
>>>>> "[#2506] System has a headache".
>>>>>
>>>>> How have others dealt with this need?
>>>>>
>>>>> Are there any additional logging libraries that can help deal with this
>>>>> issue or any other relevant works that may be of interest?
>>>>>
>>>>> thanks for your input, David
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>>>
>> 
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message