bugzilla | 2 Dec 2002 19:29
Picon
Favicon

DO NOT REPLY [Bug 14997] New: - High Throughput, High Threads, Log File not Rollingover

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14997>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14997

High Throughput, High Threads, Log File not Rollingover

           Summary: High Throughput, High Threads, Log File not Rollingover
           Product: Log4j
           Version: 1.2
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: log4j-dev <at> jakarta.apache.org
        ReportedBy: scott.c.pollack <at> wellsfargo.com

I'm using a normal log4j configuration:

log4j.rootCategory=INFO, A1
log4j.appender.A1=org.apache.log4j.RollingFileAppender 
log4j.appender.A1.File=/var/imPceWraper.log
log4j.appender.A1.MaxFileSize=10KB
log4j.appender.A1.MaxBackupIndex=10
log4j.appender.A1.Append=false
(Continue reading)

bugzilla | 2 Dec 2002 19:41
Picon
Favicon

DO NOT REPLY [Bug 14997] - High Throughput, High Threads, Log File not Rollingover

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14997>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14997

High Throughput, High Threads, Log File not Rollingover

ceki <at> apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

------- Additional Comments From ceki <at> apache.org  2002-12-02 18:41 -------

Scott,

Would it be possible for you to create a test-case reproducing the problem? It 
would make it much easier for me to correct the problem. Many thanks in 
advance,
ceki | 3 Dec 2002 18:39
Picon
Favicon

cvs commit: jakarta-log4j INSTALL

ceki        2002/12/03 09:39:08

  Modified:    .        INSTALL
  Log:
  Corrected minor mistakes in the INSTALL file.

  Revision  Changes    Path
  1.21      +3 -2      jakarta-log4j/INSTALL

  Index: INSTALL
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/INSTALL,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- INSTALL	9 Oct 2002 22:50:01 -0000	1.20
  +++ INSTALL	3 Dec 2002 17:39:07 -0000	1.21
   <at>  <at>  -73,8 +73,9  <at>  <at> 
       parser. Compiling the DOMConfigurator requires the presence of a
       JAXP parser in the classpath.  

  -    Log4j is shipped with jaxp.jar and parser.jar files under the
  -    build/lib/ directory.
  +    Given that Ant already ships with a compatible XML parser, you do
  +    *not* need to worry about setting the parser when building,
  +    i.e. compiling, log4j.

       ------------
       SMTPAppender
(Continue reading)

ceki | 3 Dec 2002 18:37
Picon
Favicon

cvs commit: jakarta-log4j/docs manual.html

ceki        2002/12/03 09:37:02

  Modified:    docs     manual.html
  Log:
  Changed link to the complete manual.

  Revision  Changes    Path
  1.36      +5 -3      jakarta-log4j/docs/manual.html

  Index: manual.html
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/manual.html,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- manual.html	9 Oct 2002 22:50:01 -0000	1.35
  +++ manual.html	3 Dec 2002 17:37:02 -0000	1.36
   <at>  <at>  -25,9 +25,11  <at>  <at> 
         edition of <a
         href="http://www.javaworld.com">JavaWorld</a>. However, the
         present article contains more detailed and up to date
  -      information. The short manual also borrows some text from the
  -      book "log4j: the Manual" by the same author (yours truly).
  -
  +      information. The present short manual also borrows some text
  +      from <a
  +      href="http://www.flashline.com/components/view.jsp?prodid=4702&affiliateid=657173">
  +      "<em>The complete log4j manual</em>"</a> by the same author
  +      (yours truly).

(Continue reading)

Ceki Gülcü | 3 Dec 2002 18:46
Picon
Gravatar

Re: cvs commit: jakarta-log4j/src/java/org/apache/log4j PluginRegistry.java Level.java PropertyConfigurator.java PatternLayout.java TTCCLayout.java PluginSkeleton.java Category.java LogManager.java Receiver.java Plugin.java Logger.java Hierarchy.java


Thanks Mathias. When you intend to make commits covering many files it 
would be nice to have a prior warning. Also some of the changes could have 
merited an explanation, e.g. changes to Logger.java.

At 10:27 22.11.2002 +0000, you wrote:
>pathos      2002/11/22 02:27:24
>
>   Modified:    src/java/org/apache/log4j PluginRegistry.java Level.java
>                         PropertyConfigurator.java PatternLayout.java
>                         TTCCLayout.java PluginSkeleton.java Category.java
>                         LogManager.java Receiver.java Plugin.java
>                         Logger.java Hierarchy.java
>   Log:
>   Small updates.
>
>   Revision  Changes    Path
>   1.3       +0 
> -1      jakarta-log4j/src/java/org/apache/log4j/PluginRegistry.java

--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793
ceki | 3 Dec 2002 18:41
Picon
Favicon

cvs commit: jakarta-log4j/src/java/org/apache/log4j/helpers ThreadLocalMap.java

ceki        2002/12/03 09:41:05

  Modified:    src/java/org/apache/log4j MDC.java
               src/java/org/apache/log4j/helpers ThreadLocalMap.java
  Log:
  Clean up in the MDC code since log4j 1.3 requires JDK 1.2+.

  Revision  Changes    Path
  1.12      +36 -91    jakarta-log4j/src/java/org/apache/log4j/MDC.java

  Index: MDC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/MDC.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- MDC.java	9 Oct 2002 22:50:02 -0000	1.11
  +++ MDC.java	3 Dec 2002 17:41:04 -0000	1.12
   <at>  <at>  -33,114 +33,59  <at>  <at> 
       <at> author Ceki G&uuml;lc&uuml; */
   public class MDC {

  -  final static MDC mdc = new MDC();
  -  
     static final int HT_SIZE = 7;
  -
  -  boolean java1;

  -  Object tlm;
  +  static private final ThreadLocalMap tlm = new ThreadLocalMap();
(Continue reading)

bugzilla | 4 Dec 2002 02:29
Picon
Favicon

DO NOT REPLY [Bug 14997] - High Throughput, High Threads, Log File not Rollingover

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14997>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14997

High Throughput, High Threads, Log File not Rollingover

scott.c.pollack <at> wellsfargo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |INVALID

------- Additional Comments From scott.c.pollack <at> wellsfargo.com  2002-12-04 01:29 -------
For the past day I've been working on a test-case, but to no avail.  I haven't 
been able to reproduce it in a smaller test-case.  I did, however, just realize 
a major mistake I made which i think lead me to believe it was a threading 
problem.

Becuase my program has 2 entry points, I initialize the log4j in each of these 
separate locations.  If you look at my config I have 
log4j.appender.A1.Append=false, which means if I intialize the 2nd log4j 
instance while the 1st is logging, all of the log information the 1st had done 
will be truncated.  very bad...  I've fixed this problem and I haven't seen a 
failure to roll yet.  I'm going to continue to monitor my logging to see if the 
rolling error occurs, but i think it was just me trying to figure out what was 
(Continue reading)

bugzilla | 4 Dec 2002 12:21
Picon
Favicon

DO NOT REPLY [Bug 15056] New: - DailyRollingFileAppender doesn't roll over weeks, if default Local is not set to ENGLISH

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15056>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15056

DailyRollingFileAppender doesn't roll over weeks, if default Local is not set to ENGLISH

           Summary: DailyRollingFileAppender doesn't roll over weeks, if
                    default Local is not set to ENGLISH
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Appender
        AssignedTo: log4j-dev <at> jakarta.apache.org
        ReportedBy: juergen.ott <at> fh-hof.de

DailyRollingFileAppender#computeCheckPeriod( line 263)

  RollingCalendar 
rollingCalendar = 
     new RollingCalendar(gmtTimeZone, Locale.ENGLISH);

  should be
(Continue reading)

Rich Gibbs | 4 Dec 2002 21:41

Rolling appender, that contains standard err/out

Has anyone come across the need to be able to have the standard streams of
stdout, and stderr go to a rolling logfile?

I played with extending the rollinglog appender, and have a working version.
I'm not completly happy in that it will only roll, when logging is done to a
category, but the size is incremented for standard streams, so as long as
atleast some of the logging goes to a category, the logs will roll properly,
or atleast reasonably...
Chris.Nokes | 4 Dec 2002 22:41
Picon

Re: Rolling appender, that contains standard err/out


Rich,
I extended PrintStream to accept a Logger and priority on the constructor.
The write(String) and print(Object) methods are overriden to call log4j.
All other methods are overriden to call one of those 2.  I extended log4j
configuration to accept a property, if set to true then:

      System.setOut(new Log4JPrintStream(Logger.getLogger("System.Out"),
Priority.NORMAL));
      System.setErr(new Log4JPrintStream(Logger.getLogger("System.Err"),
Priority.ERROR));

You'll need a "NullOutputStream" object to pass to the constructor of
PrintStream during the super call in the Log4JPrintStream constructor.  It
overrides OutputStream methods with no-ops.

This works for any appender and in your case will definitely roll when it
should.  Only drawbacks are formatting when making multiple calls to
System.out and expecting it to be 1 message, but then again you probably
have that issue now.

Chris

                                                                                                                                   
                      Rich Gibbs                                                                                                   
                      <rich.gibbs <at> enhan        To:       "Log4j-Dev (E-mail)" <log4j-dev <at> jakarta.apache.org>                       
                      siv.com>                 cc:                                                                                 
                                               Subject:  Rolling appender, that contains standard err/out                          
                      12/04/2002 02:41                                                                                             
                      PM                                                                                                           
(Continue reading)


Gmane