DO NOT REPLY [Bug 28961] - loggers shift files but don't roll (not deleting oldest files by prescribes file count)

2004-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28961.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28961

loggers shift files but don't roll (not deleting oldest files by prescribes file count)

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2004-05-29 17:07 ---
If you have specific requirements, you'll have to write custom code. If you want
to submit it for inclusion later, it's fine, but I don't see any huge interest
at this time to reinvent log4j features (esp since we'll likely get rid of them
soon after).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 28961] - loggers shift files but don't roll (not deleting oldest files by prescribes file count)

2004-05-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28961.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28961

loggers shift files but don't roll (not deleting oldest files by prescribes file count)





--- Additional Comments From [EMAIL PROTECTED]  2004-05-28 18:09 ---
The Remy I'm referring to is Remy Maucherat, another Tomcat developer.  Please 
ignore that reference, though, as it is too long to explain and not a big deal 
anyways ;)

I understand that to you rolling implies also deleting files as configured by 
the deployer/integrator/administrator.  My concept of rolling is different, and 
includes only the rolling itself, not removal or archival of any kind.  Those 
are separate concerns which merit separate policies, as we're doing for example 
in log4j 1.3.  

So yes, we ARE saying to tomcat deployers / integrators / administrators that 
they're responsible for assuring their server logs don't run out of space.  
Just like we tell application developers on the tomcat-user list to NOT use the 
Loggers, and use a logging toolkit like log4j if at all possible, because of 
the enhanced features those toolkits provides.

Though Loggers are required by the Servlet Specification, not even simple 
rolling is required, and so tomcat would be perfectly in line to just dump all 
output to System.out.

That said, I can see the value in log4j/java.util.logging proxies, so if you 
submit code for them, I'll be glad to review/comment/commit it as needed.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 28961] - loggers shift files but don't roll (not deleting oldest files by prescribes file count)

2004-05-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28961.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28961

loggers shift files but don't roll (not deleting oldest files by prescribes file count)





--- Additional Comments From [EMAIL PROTECTED]  2004-05-28 22:21 ---
Precision:

We don't log to tomcat, we don't use tomcat nor servlet loggers.
We don't even write to system out. We do use log4j since the beginning.

But tomcat is logging by itself. And we want it to log whatever goes wrong with
it. Only we can't tell it to roll-and-delete.

Hope this makes more sense now.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 28961] - loggers shift files but don't roll (not deleting oldest files by prescribes file count)

2004-05-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28961.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28961

loggers shift files but don't roll (not deleting oldest files by prescribes file count)





--- Additional Comments From [EMAIL PROTECTED]  2004-05-28 23:38 ---
package company.util;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;

import org.apache.catalina.Container;
import org.apache.catalina.Logger;

/**
 * in logging properties:
 * 
 * log4j.category.tomcatlog=INFO, tomcat
 * 
 * log4j.appender.tomcat=org.apache.log4j.RollingFileAppender
 * log4j.appender.tomcat.MaxFileSize=1000KB
 * log4j.appender.tomcat.MaxBackupIndex=9
 * log4j.appender.tomcat.Append=true
 * log4j.appender.tomcat.File=tomcat.log
 * log4j.appender.tomcat.layout=org.apache.log4j.PatternLayout
 * log4j.appender.tomcat.layout.ConversionPattern=%d %-5p [%t] %c - %m%n
 * 
 * 
 * In server.xml:
 * 
 * Logger verbosity=4 className=company.util.Log4JLogger
log4JLoggerName=tomcatlog/
 *
 * Drop log4j jar in tomcat's common/lib
 * 
 * Drop this Log4JLogger class under proper tree under server/classes
 * 
 */
public class Log4JLogger implements Logger {

static final String info = Log4JLogger.class.getName()+/1.0;

PropertyChangeSupport support = new PropertyChangeSupport(this);
Container container = null;
int debug = 0;
int verbosity = ERROR;
String loggerName;

org.apache.log4j.Logger log4jLogger = null;


public Log4JLogger() {
log4jLogger = org.apache.log4j.Logger.getLogger(Log4JLogger.class);
}

public void setLog4JLoggerName(String loggerName) {
if(loggerName!=null) {
org.apache.log4j.Logger l = 
org.apache.log4j.Logger.getLogger(loggerName);
if(l!=null) {
log4jLogger = l;
this.loggerName = loggerName;
}
} else {
this.loggerName = null;
log4jLogger = 
org.apache.log4j.Logger.getLogger(Log4JLogger.class);
}
}

public String getLog4JLoggerName() {
return loggerName;
}

//--

public void log(Exception exception, String msg) {
log4jLogger.error(msg, exception);
}

public void log(String message, int verbosity) {
if (this.verbosity = verbosity) {
switch(verbosity) {
case FATAL: log4jLogger.fatal(message); break;
case ERROR: log4jLogger.error(message); break;
case WARNING: log4jLogger.warn(message); break;
case INFORMATION: log4jLogger.info(message); break;
case DEBUG: log4jLogger.debug(message); break;
}
}
}
public void log(String message, Throwable throwable, int verbosity) {
if (this.verbosity = verbosity) {
switch(verbosity) {
case FATAL: log4jLogger.fatal(message, throwable); 
break;
case ERROR: log4jLogger.error(message, throwable); 
break;
case WARNING: log4jLogger.warn(message, throwable); 
break;
case INFORMATION: log4jLogger.info(message, 
throwable); break;
case DEBUG: log4jLogger.debug(message, throwable); 
break;
}
}
}
public void log(String message, Throwable throwable) {
log4jLogger.error(message, throwable);
}

public void log(String message) {
log4jLogger.info(message);
}

//--

public Container getContainer() {
return (container);
}

public void setContainer(Container container) {
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange(container, oldContainer, this.container);
}


public String getInfo() {
return (info);
}

public int getVerbosity() {
return (this.verbosity);
}

public void setVerbosity(int verbosity) {
this.verbosity = verbosity;
}

public void addPropertyChangeListener(PropertyChangeListener listener) {
   

DO NOT REPLY [Bug 28961] - loggers shift files but don't roll (not deleting oldest files by prescribes file count)

2004-05-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=28961.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28961

loggers shift files but don't roll (not deleting oldest files by prescribes file count)

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |
Summary|provide new Log4J/java2-|loggers shift files but
   |logging-api proxy loggers   |don't roll (not deleting
   |class   |oldest files by prescribes
   ||file count)



--- Additional Comments From [EMAIL PROTECTED]  2004-05-27 14:48 ---
System integrators consider this RFE seriously.

Please take your time to fully understand the consequence and do not discard the
idea because the singular piece of code you seam to focus on will not be
updated. You are free to carry this RFE to the most up to date logging framework
catalina intent to use, but in the mean time, tomcat 5.0.24 user do not have
access to those updates.

You effectively said to every tomcat users, that they must start writing
scripts, or task, or cron jobs, or logrotate setup, or background thread in a
monitoring servlet, that will monitor a file system for logs and delete older
ones manually. This is a waste of energy, as the logger itself can do a simple
check, as it is already aware of every log details.

Rolling implies the concept of circular buffer and means that the size of the
storage is finite.

You can't affrim your logs rotate unless you guaranty the log storage won't
exceed a prescribes size, time or filecount.

You logger barely shifts files, which is just a convenient implementation
choice, but doesn't fulfill the rolling requirements.

The lack of this feature makes it difficult for system integrators to deploy
apps without having to worry about badly behaving loggers that effectively leaks
on hard disk.

Thanks for reconsidering this request.

Note: I don't get that Remy thing you are refering to, but remember that
everyone hears a voice when they read, and that voice is reflecting the mood and
attitude of the reader. I don't know how my texts were interpreted, but I mostly
 push non-objectively when thing really don't make sense. That should ring a
bell to you guys, that there is something serious going on, and not just a
stupid guys personnal favor. I don't have time to waste on simple things. So if
you feel I'm harsh, I feel you are not very understanding at the same time, so
why don't we read each other in a perfectly objective way, sifting only the core
message. 

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]