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 Todd Flautt <tf...@csc.com> on 2005/01/12 18:27:24 UTC
MDC and Chainsaw configuration
Greetings all ~
Can someone enlighten me as to how to set up the configuration for
LogFilePatternReceiver as it relates to using MDC?
Additionally, is there a way to set up a ConversionPattern in log4j that
uses MDC but is not cognizant of the number of properties used in the MDC?
In other words as I understand it a ConversionPattern using MDC may looks
something like this:
%d %c %-5p [%t] (%F:%L) - %X[account_id] - %m
But suppose the account_id is not always relevant for a given context? Is
there a way to specify the equivalent of %X without the notion of what
property is involved? If not I guess I can use NDC to achieve the same
result but must worry about duplicate data being put in the context.
Thx
Todd