It is very easy. You just have to extend the AppenderSkeleton abstract
class.
And write your implementation login in the append method.
Regards,
Rohit B. Rai,
Cordys RD (India) Pvt. Ltd.
--
If you haven't found
On Mon, Jul 03, 2006 at 02:18:13PM -0400, Javier Gonzalez wrote:
You only have an appender attached to the root logger, and the root
logger is configured to show only messages of ERROR level and higher.
Right, but for org.apache.commons it is set to DEBUG.
A possible fix is configuring the
Hi,
I am using log4j for both application logs as well
as server logs.For application logs i put the
log4j.xml under WEB-INF/classes and for server logs i
am using Default log4j.xml which comes with the JBOSS
application server . Now i am using the default
configuration (log4j.xml) that comes
If you use xml configuration file you can attach one ore more self written
filter class(es):
example:
appender name=CONSOLE.OUT class=org.apache.log4j.ConsoleAppender
param name=target value=System.out/
layout class=org.apache.log4j.PatternLayout
param
I am trying to figure out if there is a way to reload the properties file
anytime it changes without restarting the system. One of our requirements
is that the properties file can be changed and the logging will
automatically change without restarting the system. I know you can use the
Is there some way (API), through which i can get a collection of appenders that
have been mentioned(configured) through log4j config files? Consider the
following log4j.xml:
?xml version=1.0 encoding=UTF-8?
!DOCTYPE
but I don't see how you could put this method in each class that instantiates
a logger
You dont have to put the statement in each and every class that uses a
logger. Use can just invoke it once(in may be some central class of your
application), thats it.
sudhakardvvn [EMAIL PROTECTED]
Thank you, Heri, for that answer. It works. However it does have one catch, the
method needs to know the logger name. What i was trying out was:
for (each logger mentioned in the log4j.xml) {
for (each appender of the logger) {
//get the appender information
}
}
On 7/4/06, Eugeny N Dzhurinsky [EMAIL PROTECTED] wrote:
On Mon, Jul 03, 2006 at 02:18:13PM -0400, Javier Gonzalez wrote:
You only have an appender attached to the root logger, and the root
logger is configured to show only messages of ERROR level and higher.
Right, but for org.apache.commons
LogManager.getCurrentLoggers() gives you an enumeration of the loggers in the
repository
Thank you, Heri. Will have a look at it.
-Jaikiran
Bender Heri [EMAIL PROTECTED] wrote:
LogManager.getCurrentLoggers() gives you an enumeration of the loggers in the
repository. But I am not
10 matches
Mail list logo