RE: Custom Appender works fine with rootlogger, but not when logger specified

2009-03-19 Thread Matt Brown
It sounds like instead of using a logger named "com.company.blah.MyClass", your code is asking log4j for a logger named simply "MyClass". Therefore when your log4j.properties configuration refers to the logger named "MyClass", it works as you expect; but when you attempt to configure the logger

RE: AW: Newbie questions

2009-04-09 Thread Matt Brown
To answer the original question: If the log4j.xml used to configure log4j ONLY has: Your log output will be sent absolutely nowhere, as you are not declaring anywhere for it to go! The original question is not clear if this snippet is the ONLY configuration or just a snippet. T

RE: Is there any way to output the log statemts from a particular method to a different log file other than what is configued for that package?

2009-04-16 Thread Matt Brown
A pretty simple solution would be to have each method use two different Logger objects (with different names). -Original Message- From: Vani Bandargal [mailto:vanims...@hotmail.com] Sent: Thursday, April 16, 2009 10:05 AM To: log4j-user@logging.apache.org Subject: Is there any way to out

RE: Is there any way to output the log statemts from a particular method to a different log file other than what is configued for that package?

2009-04-16 Thread Matt Brown
The point of using two different names is that then it allows you to configure these two loggers differently in your configuration (either log4j.xml or log4j.properties or whatever other method you are using to configure log4j). If you give the loggers two different names, but they are still bei

RE: Is there any way to output the log statemts from a particular method to a different log file other than what is configued for that package?

2009-04-16 Thread Matt Brown
You have this configuration: log4j.logger.package1.delegate=ERROR, database1 log4j.logger.package1.delegate=ERROR, database2 Yet with this code, you are using the loggers named "databaselog1" and "databaselog2": private static Logger logger1 = Logger.getLogger("databasel

RE: Is there any way to output the log statemts from a particular method to a different log file other than what is configued for that package?

2009-04-16 Thread Matt Brown
http://logging.apache.org/log4j/1.2/manual.html Take a look at the section on Appender Additivity. -Original Message- From: Vani Bandargal [mailto:vanims...@hotmail.com] Sent: Thursday, April 16, 2009 1:18 PM To: log4j-user@logging.apache.org Subject: RE: Is there any way to output th

RE: Client side logging

2009-04-21 Thread Matt Brown
You'll need to configure Jboss to send system out someplace else; the use of a ConsoleAppender does not mean that log4j automatically or magically redirects any calls to System.out to someplace else. When you say "i am setting the Rolling appender as the root appender then its child appender(

RE: Log4j exception Could not close org.apache.log4j.helpers.CountingQuietWriter

2009-04-24 Thread Matt Brown
Can you share your log4j configuration? -Original Message- From: ramakrishna menon [mailto:rmenon...@gmail.com] Sent: Friday, April 24, 2009 11:08 AM To: log4j-user@logging.apache.org Subject: Log4j exception Could not close org.apache.log4j.helpers.CountingQuietWriter Hi I have a web

RE: Log4j exception Could not close org.apache.log4j.helpers.CountingQuietWriter

2009-04-24 Thread Matt Brown
.digester=debug --- R. M. Menon - A Rafi fan(www.mohdrafi.com) Author, Expert Oracle JDBC Programming, http://www.amazon.com/exec/obidos/tg/detail/-/159059407X/ --- On Fri, Apr 24, 2009 at 8:10 AM, Matt Brown wrote:

RE: Log stack trace or simply message option?

2009-04-27 Thread Matt Brown
I'm kind of curious why you wouldn't want the stacktrace in "release" mode. Isn't it just as valuable to you then as it is during "debug" mode - perhaps moreso if it is a "release" version of your software? You could just log the exceptions to a different level, one that is not enabled in the "

RE: Log stack trace or simply message option?

2009-04-28 Thread Matt Brown
ten? Cheers -- Steven Keens -Original Message- From: Matt Brown [mailto:matt.br...@citrixonline.com] Sent: Monday, 27 April, 2009 16:28 To: Log4J Users List Subject: RE: Log stack trace or simply message option? I'm kind of curious why you wouldn't want the stacktrace in "r

Warning in Javadoc of JDBCAppender

2009-04-30 Thread Matt Brown
The Javadoc for the 1.2 version of JDBCAppender (at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/jdbc/JDBCAppender.html) has a nice big red warning at the top: WARNING: This version of JDBCAppender is very likely to be completely replaced in the future. Moreoever, it does not lo

RE: DailyRollingAppender - How does it know when to rollover?

2009-05-05 Thread Matt Brown
The date pattern that you have: log4j.appender.R.DatePattern='.'-MM Will only roll the files over on a monthly basis. Just want to be sure that this is what you intend? If this is the intended behavior, I'd check to make sure that a different log4j configuration file isn't being loade

RE: DailyRollingAppender - How does it know when to rollover?

2009-05-11 Thread Matt Brown
Just a suggestion, but if this is a development server, and the application is already getting re-deployed more than daily, why not experiment with a smaller rollover time (daily or hourly)? Just to make sure that DailyRollingAppender isn't somehow borked in your combination of OS / app server

RE: tomcat catalina logs

2009-05-11 Thread Matt Brown
http://wiki.apache.org/tomcat/HowTo#head-af688216137bbf0542fa3f599cd4c41dcba68056 -Original Message- From: Kaushal Shriyan [mailto:kaushalshri...@gmail.com] Sent: Monday, May 11, 2009 6:40 AM To: log4j-user@logging.apache.org Subject: tomcat catalina logs Hi Is there a step by step gu

RE: DailyRollingAppender - How does it know when to rollover?

2009-05-19 Thread Matt Brown
his because my brain is too one-dimensional today. > Great suggestion. > > Thanks. > > Marc > > > > Matt Brown-20 wrote: >> >> >> Just a suggestion, but if this is a development server, and the >> application is already getting re-deployed mor

RE: Logging to console and file at different levels

2009-06-05 Thread Matt Brown
You can try adding a threshold to the console appender: log4j.appender.CONSOLE.threshold = WARN This should tell the console appender to ignore any log messages it might receive below the WARN level. -Original Message- From: Bai Shen [mailto:baishen.li...@gmail.com] Sent: Friday, Ju

RE: log4j lock application

2009-06-16 Thread Matt Brown
How do you know that log4j.info is the culprit - that the application is blocked there? Can you take a threaddump of the hung application and use that to confirm? You can use visualvm within the JDK to make this easy. What does your log4j config look like? -Original Message- From: Mort

RE: High CPU usage impact to log4j

2009-06-24 Thread Matt Brown
I believe with JDK5 you can use jconsole, which is very similar to VisualVM and has most of the same sort of features. Perhaps that will help in the future. From: Arica [xun...@263.net] Sent: Wednesday, June 24, 2009 10:39 PM To: log4j-user@logging.apache.

RE: Windows server 2 008 64 bit

2009-09-01 Thread Matt Brown
Does Java run on Windows 2008? Then log4j will work on it. -Original Message- From: than...@ovi.com [mailto:than...@ovi.com] Sent: Tuesday, September 01, 2009 1:05 AM To: log4j-user@logging.apache.org Subject: Windows server 2 008 64 bit Dear All, I would like to know whether log4j 1.2

RE: Uregent Issue in log4j log message is rooted to System.out

2009-09-04 Thread Matt Brown
Take a look at the axis.jar (and other axis-related jars, such as axis-ant.jar) and make sure to remove any log4j.properties / log4j.xml that any of them might have packaged within the JAR. I remember being bitten by a similar problem once before - one of the axis JARs unexpectedly including a

RE: Verifying initialization

2009-09-11 Thread Matt Brown
I don't think you're going to find anything in log4j proper which can help you find out this type of information. I believe that one of the major design goals for log4j was for the framework to fail gracefully, and not have logging errors cause application errors - not to prevent an application

RE: Logging done in the wrong files

2009-09-12 Thread Matt Brown
Your mentions of EAR files make me wonder if the different "applications" are running in the same classloader - are they? Have you put log4j in a common classloader shared by both applications? This might explain what you are seeing - IIRC web containers like WebSphere set up hierarchal classl

RE: Diff between Logger and Log

2009-09-30 Thread Matt Brown
Log and LogFactory are not log4j classes (http://logging.apache.org/log4j/1.2/apidocs/index.html). However they are both Commons Logging classes ( http://commons.apache.org/logging/commons-logging-1.1.1/apidocs/index.html ). Are you using Commons Logging on accident? Or are you trying to find

RE: Log session session information (Web)

2009-09-30 Thread Matt Brown
I've implemented this before by writing a javax.servlet.Filter to add the SessionID to the MDC of every request. -Original Message- From: Renan Vinícius Mozone [mailto:renan.moz...@gmail.com] Sent: Wednesday, September 30, 2009 2:13 PM To: log4j-user@logging.apache.org Subject: Log sess

RE: log4j xml format to log4j.properties help

2009-10-13 Thread Matt Brown
Looking at the source, it appears that PropertyConfigurator supports both "log4j.category" or "log4j.logger" interchangably, as well as "log4j.rootCategory" and "log4j.rootLogger". Do you really mean for this to be all on one line or is it an email formatting error? log4j.category.com.opensymp

RE: Logging without logging to the root logger

2009-10-21 Thread Matt Brown
Why don't you just move the appender-ref for stdoutAppender from the root level to the "my.company" logger? -Original Message- From: Ofer Kalisky [mailto:kali...@hotmail.com] Sent: Wednesday, October 21, 2009 2:15 PM To: log4j-user@logging.apache.org Subject: Logging without logging to

RE: Log4j over several java classes

2009-11-04 Thread Matt Brown
If each of your classes create a new LogFile instance, and the constructor of the LogFile class creates a new appender and adds it to the root logger, then this means that you've attached N copies of the appender to the root logger. This explains why you are seeing the message duplicated in the

Re: one project multiple log files

2009-11-20 Thread Matt Brown
What does your log4j.xml/properties look like? What you want is easily achievable, you just need to set it up correctly. log4j.rootLogger = ERROR log4j.logger.com.one = DEBUG, ONE log4j.logger.com.two = DEBUG, two log4j.appender.ONE = ... log4j.appender.TWO = ... etc. On Fri, Nov 20, 2009 at

Re: bizarre NPE exception

2009-11-20 Thread Matt Brown
FAQ answer refers to log4j 1.2.16, which has not been released yet - is that coming soon? On Fri, Nov 20, 2009 at 8:26 AM, Curt Arnold wrote: > Please read the FAQ on Tomcat class-loading at > http://svn.apache.org/repos/asf/logging/log4j/trunk/src/site/fml/faq.fml. > There are ways to reconfig

Broken link in log4j API docs

2010-03-16 Thread Matt Brown
Not sure if this is the proper list to report this on but http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/DOMConfigurator.htmllinks to http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/log4j.dtdwhich is broken. Thanks Matt