Hello all,
I know it will sound a bit strange but I need a log4j wrapper.
I don't think it is realy useful, by my boss requires (although I tried
to convince him it is useless >:-(
The idea is to have a wrapper class which holds the entire log4j logic.
Every time a class needs to log it will use the wrapper.
I tried to write a singlethon wrapper, but I have encounter a problem.
What if I would like to log the place this logging occured? I want it
to be like the regular use of log4j where the class name and line is in
the log.
Another thing, I want to be able to determine the logging level in the
hierarchy.
Is it possible?
Does anyone familiar with such a wrapper?
Thanks,
Asi
Daniel Dyer - 27 Nov 2006 15:01 GMT
> Hello all,
>
[quoted text clipped - 4 lines]
> The idea is to have a wrapper class which holds the entire log4j logic.
> Every time a class needs to log it will use the wrapper.
I'm tempted to ask why, but I'm not sure I want to know.
> I tried to write a singlethon wrapper, but I have encounter a problem.
> What if I would like to log the place this logging occured? I want it
[quoted text clipped - 5 lines]
> Is it possible?
> Does anyone familiar with such a wrapper?
Are you aware of Commons Logging
(http://jakarta.apache.org/commons/logging/)? It is a wrapper around
Log4J or Sun's JDK logging, so that you can switch between them without
changing your code. In most cases it is utterly pointless (how often do
you need to switch logging APIs?) but it can be useful if you are
deploying code on multiple application servers that uses different logging
systems.
Dan.

Signature
Daniel Dyer
http://www.dandyer.co.uk
rxreyn3@gmail.com - 28 Nov 2006 23:01 GMT
What is a logging level hierarchy? You mean the appenders you have
created and what the current level is for each appender? God I wish my
worst worries were logging hehe. Typical boss mentality :)
Ryan
> Hello all,
>
[quoted text clipped - 17 lines]
> Thanks,
> Asi
_weijiang_@yahoo.com - 29 Nov 2006 00:46 GMT
Too complicated.
Try LimpidLog at http://www.acelet.com/limpidlog/index.html. You do not
need to hard-code any log statement. It is an open source program.
After you register the class in question, use SuperDebugger, at
http://www.acelet.com/super/SuperDebugger/index.html, to do source
level debugging. It is a GUI debugger, even allows you to step to the
previous line...
> Hello all,
>
[quoted text clipped - 17 lines]
> Thanks,
> Asi