Thanks a lot for the tips guys!
tl;dr - skip to the end for my final, simple solution.
I'm a bit hesitant to adding expression filters to do this filtering.
The root of the issue is that I want to set the package log level using
the regular, standard way (so that anyone can do it/understand i
Dear all,
Apparently I'm having a bad day :O
The patch is now on github:
https://gist.github.com/3138235
--
Aidan Delaney
-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4
Dear all,
The source of my earlier confusion was that I was using
Category.getLevel() rather than Category.getEffectiveLevel().
The following is a patch that might allow the next person to
resolve this confusion in a shorter timeframe.
I've not used SVN in a while, but I believe that this diff is
Dear all,
Thank you for your time. It works on a small example, so it looks like I have
fouled up my classpath for my larger project.
--
Aidan
-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional
if you try this, you will find that it will work just fine, provided you
have a log4j.properties or log4j.xml around
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
with convict
Tim,
On Wed, 2012-07-18 at 12:27 -0400, Tim Watts wrote:
On Wed, 2012-07-18 at 16:00 +0100, Aidan Delaney wrote:
> > >From what I can see, it's best to create a ProjectLogger with a
> > static initialiser
> >=20
> > public class ProjectLogger {
> > static {
> > Logger logger =3D Logger.getLog
Correction: expression would use the LOGGER instead of MSG, since you're
filtering on that.
On Wed, Jul 18, 2012 at 10:54 AM, Scott Deboy wrote:
> You can use filters, including the ExpressionFilter, to build pretty much
> arbitrary expressions and filter appenders using that, but it requires yo
You can use filters, including the ExpressionFilter, to build pretty much
arbitrary expressions and filter appenders using that, but it requires you
to use a log4j.xml configuration file.
Something like this (requires you to have the 'extras' companion in your
classpath):
Use MDC for the string?
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
Charles Hache
07/18/2012 01:26 PM
Please respond to
"Log4J Users List
Hello folks,
Most of my loggers are constructed with the Logger.getLogger(String)
function, so that I can have loggers like "Device(#3, Some Description)"
instead of "ca.something.package.Device" with the goal of being able to
more easily identify which instances are writing what log lines.
On Wed, 2012-07-18 at 16:00 +0100, Aidan Delaney wrote:
> Dear all,
> I have a bunch of loosely related class files that I distrubute in a
> single jar. So, for instance I have Foo.java and Bar.java, where
> there is not top-level init() for the library. I also want to use
> log4j to replace the
Dear all,
I have a bunch of loosely related class files that I distrubute in a single
jar. So, for instance I have Foo.java and Bar.java, where there is not
top-level init() for the library. I also want to use log4j to replace the
antiquated not-quite-logging system that is in this code. I'm
12 matches
Mail list logo