Re: large amounts of 0 characters at beginning of log

2007-03-16 Thread Jeff Drew
Hi Ceki, Thanks for responding. 1. My application is multithreaded and has multiple logging subjects, but only one RollingFileAppender for this log file. So approximately 30 threads call logSubject1.info(), logSubject2.info(), etc. But these all use the same appender. 2. I am using configur

Re: large amounts of 0 characters at beginning of log

2007-03-16 Thread Ceki Gülcü
Hi Jeff, Couple of questions. Are multiple processes writing to the same file? Are you using the configureAndWatch method? At 01:39 PM 3/16/2007, Jeff Drew wrote: I'm having a problem in one installation where approximately 8 Mb of 0x00 appear at the start of the log file. Then the file cont

Re: Inconsistancy between logger.XXX("message") and logger.isXXXEnabled()

2007-03-16 Thread James Stauffer
What would the benefit of that change be? You could easily set the logger level to the minimum of all attached appenders to get the same effect. On 3/16/07, John Eisenman <[EMAIL PROTECTED]> wrote: Hi, I'm sorry, it looks like I posted the wrong information; the .xml file that I described is t

Re: Inconsistancy between logger.XXX("message") and logger.isXXXEnabled()

2007-03-16 Thread John Eisenman
The benefit would be that code that uses log4j would always run as optimally as possible even if a Sys-Op was not aware of the need to change both the level and the threshold. What would the benefit of that change be? You could easily set the logger level to the minimum of all attached appende

Re: Inconsistancy between logger.XXX("message") and logger.isXXXEnabled()

2007-03-16 Thread John Eisenman
Hi, I'm sorry, it looks like I posted the wrong information; the .xml file that I described is the reverse of that which illustrates the situation. The correct situation is that this xml file: results in this output: % java chapter3.BugApp3 bug

Re: DailyRollingFileAppender help needed please

2007-03-16 Thread James Stauffer
That log4j output is telling you that maxLogs isn't a valid property of DailyRollingFileAppender. DailyRollingFileAppender only uses the date pattern when it needs to roll. The current file is always named exactly the value of the File property. From javadocs: For example, if the File option i

RE: DailyRollingFileAppender help needed please

2007-03-16 Thread Andrew Marlow
James Stauffer wrote: > maxLogs isn't a value of that appender in 1.2. You may be > thinking of RollingFileAppender or 1.3. The question is, "what is log4j thinking of?". After all, it is log4j that says: >> log4j:WARN No such property [maxLogs] in >> org.apache.log4j.DailyRollingFileAppender.

Re: DailyRollingFileAppender help needed please

2007-03-16 Thread James Stauffer
maxLogs isn't a value of that appender in 1.2. You may be thinking of RollingFileAppender or 1.3. Don't put the pattern in the File value. On 3/16/07, Andrew Marlow <[EMAIL PROTECTED]> wrote: James Stauffer wrote: > There are no included appenders that can do that. You could > easily writ

RE: DailyRollingFileAppender help needed please

2007-03-16 Thread Andrew Marlow
James Stauffer wrote: > There are no included appenders that can do that. You could > easily write your own appender to do that or use > DailyRollingFileAppender to roll every hour and then have 6 > files for each "watch". ok, but ... The name of the file that gets created contains a literal 'yy

Re: DailyRollingFileAppender help needed please

2007-03-16 Thread James Stauffer
There are no included appenders that can do that. You could easily write your own appender to do that or use DailyRollingFileAppender to roll every hour and then have 6 files for each "watch". On 3/16/07, Andrew Marlow <[EMAIL PROTECTED]> wrote: Hello guys, I am new to log4j so please bear wit

DailyRollingFileAppender help needed please

2007-03-16 Thread Andrew Marlow
Hello guys, I am new to log4j so please bear with me. I am writing a program in java that used to be written in C++. The C++ program used a home-grown logger. I am trying to use log4j to do the logging. The homegrown logger used to write 4 logfiles per day; the files were considered as watches of

Re: Logger not found exception

2007-03-16 Thread Jacob Kjome
Quoting Kailash Chandra <[EMAIL PROTECTED]>: > I am using the log4j.2.8.jar in my ear file Log jar file is place at my lib > folder at ear level Do you mean "APP-INF/lib"? If it's just in "lib", Weblogic doesn't see that. It must be the former. > I have also set the class-path option of meta-i

Re: Inconsistancy between logger.XXX("message") and logger.isXXXEnabled()

2007-03-16 Thread James Stauffer
I just did a test with 1.2.8 and got different results. Please retest. In sps.wfds.biz.glacier.JDocOptions: logger.info("logger.isDebugEnabled()=" + logger.isDebugEnabled()); INFO 27:56.449 sps.wfds.biz.glacier.JDocOptions logger.isDebugEnabled()=false On 3/16/07,

Re: Inconsistancy between logger.XXX("message") and logger.isXXXEnabled()

2007-03-16 Thread James Stauffer
The results you claim are surprising. I don't expect it to check for the existence of a logger but I do expect the fact that the effective level is info would cause isDebugEnabled() to return false. On 3/15/07, John Eisenman <[EMAIL PROTECTED]> wrote: I'm using version 1.2.14 My expectation in

large amounts of 0 characters at beginning of log

2007-03-16 Thread Jeff Drew
I'm having a problem in one installation where approximately 8 Mb of 0x00 appear at the start of the log file. Then the file contains typical log output. A typical RollingFileAppender writes to this file. MaxFileSize=10KB and MaxBackupIndex=3. Since this log is what I use for application di

Re: many File Appenders on same file

2007-03-16 Thread Kate Ward
In the Unix world, it usually works for small amounts of data as the file system will manage the simultaneous access itself. There are no guarantees though on ordering, whether the full message will be logged (if it is a long message), or whether it will work at all. On Windows, I'm doubting it wi

AW: How to log message from the parent class

2007-03-16 Thread Wyss Patrick
add the following to you log4j.properties: " log4j.rootCategory=ALL, R1, R2 " to log all other events to both appenders/files or " log4j.logger.AbstractAnimal =ALL, R1, R2 " to log only the events of AbstractAnimal to both appenders/files btw: > Note that the classes are in three difference packa

How to log message from the parent class

2007-03-16 Thread wolverine my
Hi! I have the following Java classes: abstract class AbstractAnimal { Logger logger = Logger.getLogger(AbstractAnimal.class); protected void something() { logger.debug("animal is doing something"); } } class Dog extends AbstractAnimal { Logger logger = Logger.getLogger(Dog.class);