You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2014/11/29 12:25:13 UTC
svn commit: r1642417 -
/tomcat/trunk/java/org/apache/juli/AsyncFileHandler.java
Author: rjung
Date: Sat Nov 29 11:25:13 2014
New Revision: 1642417
URL: http://svn.apache.org/r1642417
Log:
Rename misleading DEFAULT_MAX_RECORDS to MAX_RECORDS.
Introduce new constants for magic numbers.
Modified:
tomcat/trunk/java/org/apache/juli/AsyncFileHandler.java
Modified: tomcat/trunk/java/org/apache/juli/AsyncFileHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/AsyncFileHandler.java?rev=1642417&r1=1642416&r2=1642417&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/juli/AsyncFileHandler.java (original)
+++ tomcat/trunk/java/org/apache/juli/AsyncFileHandler.java Sat Nov 29 11:25:13 2014
@@ -40,20 +40,27 @@ import java.util.logging.LogRecord;
*/
public class AsyncFileHandler extends FileHandler {
- public static final int OVERFLOW_DROP_LAST = 1;
- public static final int OVERFLOW_DROP_FIRST = 2;
- public static final int OVERFLOW_DROP_FLUSH = 3;
+ public static final int OVERFLOW_DROP_LAST = 1;
+ public static final int OVERFLOW_DROP_FIRST = 2;
+ public static final int OVERFLOW_DROP_FLUSH = 3;
public static final int OVERFLOW_DROP_CURRENT = 4;
+ public static final int DEFAULT_OVERFLOW_DROP_TYPE = 1;
+ public static final int DEFAULT_MAX_RECORDS = 10000;
+ public static final int DEFAULT_LOGGER_SLEEP_TIME = 1000;
+
public static final int OVERFLOW_DROP_TYPE = Integer.parseInt(
- System.getProperty("org.apache.juli.AsyncOverflowDropType","1"));
- public static final int DEFAULT_MAX_RECORDS = Integer.parseInt(
- System.getProperty("org.apache.juli.AsyncMaxRecordCount","10000"));
+ System.getProperty("org.apache.juli.AsyncOverflowDropType",
+ Integer.toString(DEFAULT_OVERFLOW_DROP_TYPE)));
+ public static final int MAX_RECORDS = Integer.parseInt(
+ System.getProperty("org.apache.juli.AsyncMaxRecordCount",
+ Integer.toString(DEFAULT_MAX_RECORDS)));
public static final int LOGGER_SLEEP_TIME = Integer.parseInt(
- System.getProperty("org.apache.juli.AsyncLoggerPollInterval","1000"));
+ System.getProperty("org.apache.juli.AsyncLoggerPollInterval",
+ Integer.toString(DEFAULT_LOGGER_SLEEP_TIME)));
protected static final LinkedBlockingDeque<LogEntry> queue =
- new LinkedBlockingDeque<>(DEFAULT_MAX_RECORDS);
+ new LinkedBlockingDeque<>(MAX_RECORDS);
protected static final LoggerThread logger = new LoggerThread();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org