RE: Get all appenders configured in log4j - Possible?

2006-07-04 Thread jaikiran pai
>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 no

Re: problems with logging

2006-07-04 Thread Javier Gonzalez
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.commo

RE: Get all appenders configured in log4j - Possible?

2006-07-04 Thread Bender Heri
LogManager.getCurrentLoggers() gives you an enumeration of the loggers in the repository. But I am not shure if this is a set already asked for loggers (by Logger.getLogger(..)) or if this is a set of configured loggers or both. You have to try or annother log4j guru can answer this. Heri > ---

RE: Get all appenders configured in log4j - Possible?

2006-07-04 Thread jaikiran pai
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 } }

RE: Get all appenders configured in log4j - Possible?

2006-07-04 Thread Bender Heri
/** * Finds the next appender with the given name within the hierarchie which is * defined by the given Logger, incl. RootLogger * * @param aLog the logger whose appender should be found. * @param aAppenderName the name of the desired appender * @return an array

Re: Log4j Configuration without use of configandwatch

2006-07-04 Thread sudhakardvvn
Thanks But the above method is not threadsafe. How to achieve the above without using configandwatch() method of propertyConfiguratior -- View this message in context: http://www.nabble.com/Log4j-Configuration-without-use-of-configandwatch-tf1888905.html#a5165504 Sent from the Log4j - Users foru

Re: Log4j Configuration without use of configandwatch

2006-07-04 Thread jaikiran pai
>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]

Get all appenders configured in log4j - Possible?

2006-07-04 Thread jaikiran pai
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: http://jakarta.apache.org/log4j/"; debug="false

Log4j Configuration without use of configandwatch

2006-07-04 Thread sudhakardvvn
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 PropertyC

RE: log4j custom filters how to?

2006-07-04 Thread Bender Heri
If you use xml configuration file you can attach one ore more self written filter class(es): example: Your own filter class extends org.apache.log4j.spi.Filter and could

server logfile truncated.

2006-07-04 Thread velagapudi sreenivas
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 wi

Re: problems with logging

2006-07-04 Thread Eugeny N Dzhurinsky
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

RE: log4j custom filters how to?

2006-07-04 Thread Rohit B Rai
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 R&D (India) Pvt. Ltd. -- If you haven't found somethi