When you added the URL to the marker field, did you add it with or
amp;?
When setting it via MDC, I'd be setting it as . But, in XML, it must be
escaped using amp; otherwise we'll get a parsing error, since is a
reserved character that defines the start of an entity reference.
In fact,
Here's the relevant Log4j debug output (no error thrown upon parsing, as you
can see)...
log4j: Class name: [org.apache.log4j.rolling.RollingFileAppender]
log4j: Setting property [fileNamePattern] to [./logs/myapp.%d.log.gz].
log4j: Parsing layout of class: org.apache.log4j.PatternLayout
Hey Jake
I tried this in the latest developer snapshot of Chainsaw..I pulled up a
log in Chainsaw which contained info and debug entries (I didn't have a log
with trace).
And I added your URL value you provided in the 'marker' field of two of my
INFO entries
This expression:
(level = debug) ||
Thanks Scott,
However, while I didn't experience an error in parsing the expression this
time, the expression seems to be, at least partially, ignored.
Below is the relevant config, where com.mypackage.MyClass sets MDC (via SLF4J)
with a url key and the currently processed URL as the value,
I'm trying to use the ExpressionFilter [1] from Log4j Extras to limit logging
for a particular appender to those cases where MDC contains a url entry that
equals some specific value. But I get an error from Log4j saying Invalid
EQUALS rule - MDC.url is not a supported field (see below for
Try PROP.url == 'blah'
MDC entries are really just set as properties of the log4j events.
Scott
On Tue, Oct 2, 2012 at 1:10 PM, Jacob Kjome h...@visi.com wrote:
I'm trying to use the ExpressionFilter [1] from Log4j Extras to limit
logging for a particular appender to those cases where MDC