You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2003/04/17 11:13:49 UTC
cvs commit: avalon-logkit/src/java/org/apache/log/util Closeable.java LogKit2AvalonLoggerAdapter.java LoggerListener.java StackIntrospector.java
donaldp 2003/04/17 02:13:49
Modified: src/java/org/apache/log LogEvent.java Logger.java
src/java/org/apache/log/format ExtendedPatternFormatter.java
PatternFormatter.java
src/java/org/apache/log/output AbstractOutputTarget.java
AbstractTarget.java AbstractWrappingTarget.java
AsyncLogTarget.java MemoryTarget.java
NullOutputLogTarget.java
src/java/org/apache/log/output/db AbstractJDBCTarget.java
ColumnInfo.java DefaultJDBCTarget.java
src/java/org/apache/log/output/io FileTarget.java
StreamTarget.java
src/java/org/apache/log/output/io/rotate
OrRotateStrategy.java RevolvingFileStrategy.java
RotateStrategy.java RotateStrategyByDate.java
RotateStrategyBySize.java
RotateStrategyByTimeOfDay.java
RotatingFileTarget.java UniqueFileStrategy.java
src/java/org/apache/log/output/jms MessageBuilder.java
ObjectMessageBuilder.java PropertyInfo.java
TextMessageBuilder.java
src/java/org/apache/log/output/net SMTPOutputLogTarget.java
src/java/org/apache/log/util Closeable.java
LogKit2AvalonLoggerAdapter.java LoggerListener.java
StackIntrospector.java
Log:
styled
Revision Changes Path
1.16 +1 -1 avalon-logkit/src/java/org/apache/log/LogEvent.java
Index: LogEvent.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/LogEvent.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- LogEvent.java 9 Feb 2003 23:33:21 -0000 1.15
+++ LogEvent.java 17 Apr 2003 09:13:46 -0000 1.16
@@ -262,7 +262,7 @@
{
m_category = "";
}
- if( null == m_message )
+ if( null == m_message )
{
m_message = "";
}
1.39 +3 -3 avalon-logkit/src/java/org/apache/log/Logger.java
Index: Logger.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/Logger.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- Logger.java 9 Feb 2003 23:33:21 -0000 1.38
+++ Logger.java 17 Apr 2003 09:13:46 -0000 1.39
@@ -66,9 +66,9 @@
{
private static final Logger[] EMPTY_SET = new Logger[ 0 ];
- /**
- * Separator character use to separate different categories
- */
+ /**
+ * Separator character use to separate different categories
+ */
public static final char CATEGORY_SEPARATOR = '.';
// The ErrorHandler associated with Logger
1.13 +14 -13 avalon-logkit/src/java/org/apache/log/format/ExtendedPatternFormatter.java
Index: ExtendedPatternFormatter.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/format/ExtendedPatternFormatter.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ExtendedPatternFormatter.java 7 Apr 2003 11:39:06 -0000 1.12
+++ ExtendedPatternFormatter.java 17 Apr 2003 09:13:46 -0000 1.13
@@ -85,26 +85,27 @@
private int m_callStackOffset = 0;
- /**
- * Creation of a new extended pattern formatter.
- * @param format the format string
- */
+ /**
+ * Creation of a new extended pattern formatter.
+ * @param format the format string
+ */
public ExtendedPatternFormatter( final String format )
{
this( format, 0 );
}
- /**
- * Creation of a new extended pattern formatter.
- *
- * @param format the format string
- * @param callStackOffset the offset
- */
+ /**
+ * Creation of a new extended pattern formatter.
+ *
+ * @param format the format string
+ * @param callStackOffset the offset
+ */
public ExtendedPatternFormatter( final String format, final int callStackOffset )
{
super( format );
m_callStackOffset = callStackOffset;
}
+
/**
* Retrieve the type-id for a particular string.
*
@@ -167,8 +168,8 @@
//Determine callee of user's class. If offset is 0, we need to find
// Logger.class. If offset is 1, We need to find caller of Logger.class, etc.
- final Class clazz = StackIntrospector.getCallerClass( Logger.class, m_callStackOffset - 1);
- if (null == clazz)
+ final Class clazz = StackIntrospector.getCallerClass( Logger.class, m_callStackOffset - 1 );
+ if( null == clazz )
{
return "UnknownMethod";
}
1.39 +14 -14 avalon-logkit/src/java/org/apache/log/format/PatternFormatter.java
Index: PatternFormatter.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/format/PatternFormatter.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- PatternFormatter.java 9 Feb 2003 23:33:22 -0000 1.38
+++ PatternFormatter.java 17 Apr 2003 09:13:47 -0000 1.39
@@ -209,10 +209,10 @@
{
}
- /**
- * Creation of a new patter formatter baseed on a supplied pattern.
- * @param pattern the patter
- */
+ /**
+ * Creation of a new patter formatter baseed on a supplied pattern.
+ * @param pattern the patter
+ */
public PatternFormatter( final String pattern )
{
parse( pattern );
@@ -274,14 +274,14 @@
if( index >= pattern.length || '{' != pattern[ index ] )
{
- throw new IllegalArgumentException(
- "Badly formed pattern at character " + index );
+ throw new IllegalArgumentException(
+ "Badly formed pattern at character " + index );
}
int typeStart = index;
- while( index < pattern.length
- && pattern[ index ] != ':' && pattern[ index ] != '}' )
+ while( index < pattern.length
+ && pattern[ index ] != ':' && pattern[ index ] != '}' )
{
index++;
}
@@ -308,9 +308,9 @@
if( index >= pattern.length || '}' != pattern[ index ] )
{
- throw new IllegalArgumentException(
- "Unterminated type in pattern at character "
- + index );
+ throw new IllegalArgumentException(
+ "Unterminated type in pattern at character "
+ + index );
}
index++;
@@ -525,7 +525,7 @@
return getPriority( event.getPriority(), run.m_format );
case TYPE_CONTEXT:
- if( null == run.m_format
+ if( null == run.m_format
|| run.m_format.startsWith( "stack" ) )
{
//Print a warning out to stderr here
@@ -741,7 +741,7 @@
while( index < size )
{
- if( pattern[ index ] == '%'
+ if( pattern[ index ] == '%'
&& !( index != size - 1 && pattern[ index + 1 ] == '%' ) )
{
index += addPatternRun( stack, pattern, index );
1.17 +6 -7 avalon-logkit/src/java/org/apache/log/output/AbstractOutputTarget.java
Index: AbstractOutputTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/AbstractOutputTarget.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- AbstractOutputTarget.java 9 Feb 2003 23:33:23 -0000 1.16
+++ AbstractOutputTarget.java 17 Apr 2003 09:13:47 -0000 1.17
@@ -83,7 +83,6 @@
{
}
-
/**
* Creation of a new abstract output target instance.
* @param formatter the formatter to apply
@@ -139,10 +138,10 @@
{
}
- /**
- * Process a log event.
- * @param event the event to process
- */
+ /**
+ * Process a log event.
+ * @param event the event to process
+ */
protected void doProcessEvent( LogEvent event )
{
final String data = format( event );
@@ -200,7 +199,7 @@
*/
private void writeHead()
{
- if( !isOpen() )
+ if( !isOpen() )
{
return;
}
@@ -218,7 +217,7 @@
*/
private void writeTail()
{
- if( !isOpen() )
+ if( !isOpen() )
{
return;
}
1.14 +11 -11 avalon-logkit/src/java/org/apache/log/output/AbstractTarget.java
Index: AbstractTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/AbstractTarget.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- AbstractTarget.java 17 Apr 2003 09:11:42 -0000 1.13
+++ AbstractTarget.java 17 Apr 2003 09:13:47 -0000 1.14
@@ -78,17 +78,17 @@
///Flag indicating that log session is finished (aka target has been closed)
private boolean m_isOpen;
- /**
- * AbstractTarget constructor.
- */
+ /**
+ * AbstractTarget constructor.
+ */
public AbstractTarget()
{
}
- /**
- * AbstractTarget constructor.
- * @param errorHandler the error handler
- */
+ /**
+ * AbstractTarget constructor.
+ * @param errorHandler the error handler
+ */
public AbstractTarget( final ErrorHandler errorHandler )
{
if( errorHandler == null )
@@ -108,10 +108,10 @@
m_errorHandler = errorHandler;
}
- /**
- * Return the open state of the target.
- * @return TRUE if the target is open else FALSE
- */
+ /**
+ * Return the open state of the target.
+ * @return TRUE if the target is open else FALSE
+ */
protected synchronized boolean isOpen()
{
return m_isOpen;
1.3 +1 -1 avalon-logkit/src/java/org/apache/log/output/AbstractWrappingTarget.java
Index: AbstractWrappingTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/AbstractWrappingTarget.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractWrappingTarget.java 17 Apr 2003 09:11:42 -0000 1.2
+++ AbstractWrappingTarget.java 17 Apr 2003 09:13:47 -0000 1.3
@@ -103,7 +103,7 @@
if( m_closeWrapped && m_wrappedLogTarget instanceof Closeable )
{
- ((Closeable) m_wrappedLogTarget).close();
+ ( (Closeable)m_wrappedLogTarget ).close();
}
}
}
1.16 +14 -14 avalon-logkit/src/java/org/apache/log/output/AsyncLogTarget.java
Index: AsyncLogTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/AsyncLogTarget.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- AsyncLogTarget.java 4 Mar 2003 14:34:13 -0000 1.15
+++ AsyncLogTarget.java 17 Apr 2003 09:13:47 -0000 1.16
@@ -86,20 +86,20 @@
private final int m_queueSize;
private final LogTarget m_logTarget;
- /**
- * Creation of a new async log target.
- * @param logTarget the underlying target
- */
+ /**
+ * Creation of a new async log target.
+ * @param logTarget the underlying target
+ */
public AsyncLogTarget( final LogTarget logTarget )
{
this( logTarget, 15 );
}
- /**
- * Creation of a new async log target.
- * @param logTarget the underlying target
- * @param queueSize the queue size
- */
+ /**
+ * Creation of a new async log target.
+ * @param logTarget the underlying target
+ * @param queueSize the queue size
+ */
public AsyncLogTarget( final LogTarget logTarget, final int queueSize )
{
this( logTarget, queueSize, false );
@@ -115,7 +115,7 @@
{
this( logTarget, 15, closeTarget );
}
-
+
/**
* Creation of a new async log target.
* @param logTarget the underlying target
@@ -131,7 +131,7 @@
m_queueSize = queueSize;
open();
}
-
+
/**
* Provide component with ErrorHandler.
*
@@ -183,9 +183,9 @@
}
}
- /**
- * Thread startup.
- */
+ /**
+ * Thread startup.
+ */
public void run()
{
//set this variable when thread is interupted
1.12 +6 -6 avalon-logkit/src/java/org/apache/log/output/MemoryTarget.java
Index: MemoryTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/MemoryTarget.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- MemoryTarget.java 9 Feb 2003 23:33:23 -0000 1.11
+++ MemoryTarget.java 17 Apr 2003 09:13:47 -0000 1.12
@@ -91,12 +91,12 @@
///Flag indicating whether it is possible to overite elements in array
private boolean m_overwrite;
- /**
- * Creation of a new instance of the memory target.
- * @param target the target to push LogEvents to
- * @param size the event buffer size
- * @param threshold the priority at which to push LogEvents to next LogTarget
- */
+ /**
+ * Creation of a new instance of the memory target.
+ * @param target the target to push LogEvents to
+ * @param size the event buffer size
+ * @param threshold the priority at which to push LogEvents to next LogTarget
+ */
public MemoryTarget( final LogTarget target,
final int size,
final Priority threshold )
1.11 +3 -3 avalon-logkit/src/java/org/apache/log/output/NullOutputLogTarget.java
Index: NullOutputLogTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/NullOutputLogTarget.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- NullOutputLogTarget.java 9 Feb 2003 23:33:23 -0000 1.10
+++ NullOutputLogTarget.java 17 Apr 2003 09:13:47 -0000 1.11
@@ -63,9 +63,9 @@
public class NullOutputLogTarget
extends AbstractOutputTarget
{
- /**
- * Creation of a new null log target.
- */
+ /**
+ * Creation of a new null log target.
+ */
public NullOutputLogTarget()
{
open();
1.10 +6 -6 avalon-logkit/src/java/org/apache/log/output/db/AbstractJDBCTarget.java
Index: AbstractJDBCTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/db/AbstractJDBCTarget.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AbstractJDBCTarget.java 9 Feb 2003 23:33:23 -0000 1.9
+++ AbstractJDBCTarget.java 17 Apr 2003 09:13:47 -0000 1.10
@@ -75,10 +75,10 @@
///Database connection
private Connection m_connection;
- /**
- * Creation of a new instance of the AbstractJDBCTarget.
- * @param dataSource the JDBC datasource
- */
+ /**
+ * Creation of a new instance of the AbstractJDBCTarget.
+ * @param dataSource the JDBC datasource
+ */
protected AbstractJDBCTarget( final DataSource dataSource )
{
m_dataSource = dataSource;
@@ -167,14 +167,14 @@
*/
protected synchronized boolean isStale()
{
- if( null == m_connection )
+ if( null == m_connection )
{
return true;
}
try
{
- if( m_connection.isClosed() )
+ if( m_connection.isClosed() )
{
return true;
}
1.9 +18 -18 avalon-logkit/src/java/org/apache/log/output/db/ColumnInfo.java
Index: ColumnInfo.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/db/ColumnInfo.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ColumnInfo.java 9 Feb 2003 23:33:23 -0000 1.8
+++ ColumnInfo.java 17 Apr 2003 09:13:47 -0000 1.9
@@ -71,12 +71,12 @@
///Auxilliary parameters (ie constant or sub-format)
private final String m_aux; //may be null
- /**
- * Creation of a new column info instance.
- * @param name the column name
- * @param type the column type
- * @param aux the auxillary value
- */
+ /**
+ * Creation of a new column info instance.
+ * @param name the column name
+ * @param type the column type
+ * @param aux the auxillary value
+ */
public ColumnInfo( final String name, final int type, final String aux )
{
m_name = name;
@@ -84,28 +84,28 @@
m_aux = aux;
}
- /**
- * Return the column name
- * @return the name of the column
- */
+ /**
+ * Return the column name
+ * @return the name of the column
+ */
public String getName()
{
return m_name;
}
- /**
- * Return the column type as an integer
- * @return the type
- */
+ /**
+ * Return the column type as an integer
+ * @return the type
+ */
public int getType()
{
return m_type;
}
- /**
- * Return the auxillary column information.
- * @return the information
- */
+ /**
+ * Return the auxillary column information.
+ * @return the information
+ */
public String getAux()
{
return m_aux;
1.11 +26 -26 avalon-logkit/src/java/org/apache/log/output/db/DefaultJDBCTarget.java
Index: DefaultJDBCTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/db/DefaultJDBCTarget.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DefaultJDBCTarget.java 9 Feb 2003 23:33:23 -0000 1.10
+++ DefaultJDBCTarget.java 17 Apr 2003 09:13:47 -0000 1.11
@@ -77,12 +77,12 @@
private PreparedStatement m_statement;
- /**
- * Creation of a new JDBC logging target.
- * @param dataSource the JDBC datasource
- * @param table the table
- * @param columns a ColumnInfo array
- */
+ /**
+ * Creation of a new JDBC logging target.
+ * @param dataSource the JDBC datasource
+ * @param table the table
+ * @param columns a ColumnInfo array
+ */
public DefaultJDBCTarget( final DataSource dataSource,
final String table,
final ColumnInfo[] columns )
@@ -158,10 +158,10 @@
}
}
- /**
- * Return the SQL insert statement.
- * @return the statement
- */
+ /**
+ * Return the SQL insert statement.
+ * @return the statement
+ */
protected String getStatementSQL()
{
final StringBuffer sb = new StringBuffer( "INSERT INTO " );
@@ -187,10 +187,10 @@
return sb.toString();
}
- /**
- * Test if the target is stale.
- * @return TRUE if the target is stale else FALSE
- */
+ /**
+ * Test if the target is stale.
+ * @return TRUE if the target is stale else FALSE
+ */
protected boolean isStale()
{
return super.isStale();
@@ -232,8 +232,8 @@
protected void specifyColumn( final PreparedStatement statement,
final int index,
final LogEvent event )
- throws SQLException,
- IllegalStateException
+ throws SQLException,
+ IllegalStateException
{
final ColumnInfo info = m_columns[ index ];
@@ -277,20 +277,20 @@
}
}
- /**
- * Return the underlying table
- * @return the table name
- */
+ /**
+ * Return the underlying table
+ * @return the table name
+ */
protected final String getTable()
{
return m_table;
}
- /**
- * Return the column info for an supplied index.
- * @param index the index
- * @return the column info
- */
+ /**
+ * Return the column info for an supplied index.
+ * @param index the index
+ * @return the column info
+ */
protected final ColumnInfo getColumn( final int index )
{
return m_columns[ index ];
@@ -298,7 +298,7 @@
private String getStackTrace( final Throwable throwable )
{
- if( null == throwable )
+ if( null == throwable )
{
return "";
}
1.18 +1 -1 avalon-logkit/src/java/org/apache/log/output/io/FileTarget.java
Index: FileTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/FileTarget.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- FileTarget.java 9 Feb 2003 23:33:23 -0000 1.17
+++ FileTarget.java 17 Apr 2003 09:13:48 -0000 1.18
@@ -111,7 +111,7 @@
if( isOpen() )
{
- throw new IOException( "target must be closed before "
+ throw new IOException( "target must be closed before "
+ "file property can be set" );
}
1.11 +2 -2 avalon-logkit/src/java/org/apache/log/output/io/StreamTarget.java
Index: StreamTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/StreamTarget.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- StreamTarget.java 15 Apr 2003 16:02:17 -0000 1.10
+++ StreamTarget.java 17 Apr 2003 09:13:48 -0000 1.11
@@ -108,7 +108,7 @@
// method, but it is not a standard API so we work around it by
// allowing encoding to be null.
// sun.io.Converters.getDefaultEncodingName();
-
+
this( outputStream, formatter, null );
}
@@ -149,7 +149,7 @@
try
{
byte[] bytes;
- if ( m_encoding == null )
+ if( m_encoding == null )
{
bytes = data.getBytes();
}
1.9 +2 -2 avalon-logkit/src/java/org/apache/log/output/io/rotate/OrRotateStrategy.java
Index: OrRotateStrategy.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/rotate/OrRotateStrategy.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- OrRotateStrategy.java 9 Feb 2003 23:33:24 -0000 1.8
+++ OrRotateStrategy.java 17 Apr 2003 09:13:48 -0000 1.9
@@ -77,7 +77,7 @@
/**
* Constructor
- * @param strategies the set of rotation strategies
+ * @param strategies the set of rotation strategies
*/
public OrRotateStrategy( final RotateStrategy[] strategies )
{
@@ -89,7 +89,7 @@
*/
public void reset()
{
- for (int i = 0; i < m_strategies.length; i++)
+ for( int i = 0; i < m_strategies.length; i++ )
{
m_strategies[ i ].reset();
}
1.16 +12 -12 avalon-logkit/src/java/org/apache/log/output/io/rotate/RevolvingFileStrategy.java
Index: RevolvingFileStrategy.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/rotate/RevolvingFileStrategy.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- RevolvingFileStrategy.java 9 Feb 2003 23:33:24 -0000 1.15
+++ RevolvingFileStrategy.java 17 Apr 2003 09:13:48 -0000 1.16
@@ -92,22 +92,22 @@
///the base file name.
private File m_baseFile;
- /**
- * Creation of a new instane ofthe revolving file strategy.
- * @param baseFile the base file
- * @param maxRotations the maximum number of rotations ??
- */
+ /**
+ * Creation of a new instane ofthe revolving file strategy.
+ * @param baseFile the base file
+ * @param maxRotations the maximum number of rotations ??
+ */
public RevolvingFileStrategy( final File baseFile, final int maxRotations )
{
this( baseFile, -1, maxRotations );
}
- /**
- * Creation of a new instane ofthe revolving file strategy.
- * @param baseFile the base file
- * @param initialRotation the number of initial rotations ??
- * @param maxRotations the maximum number of rotations??
- */
+ /**
+ * Creation of a new instane ofthe revolving file strategy.
+ * @param baseFile the base file
+ * @param initialRotation the number of initial rotations ??
+ * @param maxRotations the maximum number of rotations??
+ */
public RevolvingFileStrategy( final File baseFile,
final int initialRotation,
final int maxRotations )
@@ -194,7 +194,7 @@
int maxRotation = 0;
for( int i = 0; i < rotations.length; i++ )
{
- final int rotation = rotations[i ];
+ final int rotation = rotations[ i ];
if( rotation > maxRotation )
{
maxRotation = rotation;
1.7 +1 -1 avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategy.java
Index: RotateStrategy.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategy.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- RotateStrategy.java 9 Feb 2003 23:33:24 -0000 1.6
+++ RotateStrategy.java 17 Apr 2003 09:13:48 -0000 1.7
@@ -73,7 +73,7 @@
/**
* Check if a log rotation is neccessary at this time.
*
- * @param data the serialized version of the message about to be written
+ * @param data the serialized version of the message about to be written
* to the log system
* @param file the File that we are writing to
* @return boolean return true if log rotation is neccessary, else false
1.11 +19 -19 avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyByDate.java
Index: RotateStrategyByDate.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyByDate.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- RotateStrategyByDate.java 9 Feb 2003 23:33:24 -0000 1.10
+++ RotateStrategyByDate.java 17 Apr 2003 09:13:48 -0000 1.11
@@ -72,19 +72,19 @@
private Date m_date;
private String m_current;
- /**
- * Creation of a new rotation strategy based on a date policy.
- */
+ /**
+ * Creation of a new rotation strategy based on a date policy.
+ */
public RotateStrategyByDate()
{
this( "yyyyMMdd" );
}
- /**
- * Creation of a new rotation strategy based on a date policy
- * using a supplied pattern.
- * @param pattern the message formatting pattern
- */
+ /**
+ * Creation of a new rotation strategy based on a date policy
+ * using a supplied pattern.
+ * @param pattern the message formatting pattern
+ */
public RotateStrategyByDate( final String pattern )
{
m_format = new SimpleDateFormat( pattern );
@@ -92,22 +92,22 @@
m_current = m_format.format( m_date );
}
- /**
- * Reset the strategy.
- */
+ /**
+ * Reset the strategy.
+ */
public void reset()
{
m_date.setTime( System.currentTimeMillis() );
m_current = m_format.format( m_date );
}
- /**
- * Test is a rotation is required. Documentation pending ??
- *
- * @param data not used
- * @param file not used
- * @return TRUE if a rotation is required else FALSE
- */
+ /**
+ * Test is a rotation is required. Documentation pending ??
+ *
+ * @param data not used
+ * @param file not used
+ * @return TRUE if a rotation is required else FALSE
+ */
public boolean isRotationNeeded( final String data, final File file )
{
m_date.setTime( System.currentTimeMillis() );
1.13 +1 -1 avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyBySize.java
Index: RotateStrategyBySize.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyBySize.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- RotateStrategyBySize.java 9 Feb 2003 23:33:24 -0000 1.12
+++ RotateStrategyBySize.java 17 Apr 2003 09:13:48 -0000 1.13
@@ -114,7 +114,7 @@
public boolean isRotationNeeded( final String data, final File file )
{
m_currentSize += data.length();
-
+
return m_currentSize >= m_maxSize;
}
}
1.2 +6 -6 avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyByTimeOfDay.java
Index: RotateStrategyByTimeOfDay.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyByTimeOfDay.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RotateStrategyByTimeOfDay.java 7 Apr 2003 06:53:24 -0000 1.1
+++ RotateStrategyByTimeOfDay.java 17 Apr 2003 09:13:48 -0000 1.2
@@ -68,7 +68,7 @@
{
/** Constant that stores the the number of ms in 24 hours. */
private static final long TIME_24_HOURS = 24 * 3600 * 1000;
-
+
/** Time in ms that the current rotation started. */
private long m_currentRotation;
@@ -95,9 +95,9 @@
cal.set( Calendar.MINUTE, 0 );
cal.set( Calendar.HOUR_OF_DAY, 0 );
m_currentRotation = cal.getTimeInMillis() + time;
-
+
// Make sure that the current rotation time is in the past.
- if ( m_currentRotation > System.currentTimeMillis() )
+ if( m_currentRotation > System.currentTimeMillis() )
{
m_currentRotation -= TIME_24_HOURS;
}
@@ -109,10 +109,10 @@
public void reset()
{
final long now = System.currentTimeMillis();
-
+
// Make sure the currentRotation time is set so that the current system
// time is within 24 hours.
- while ( m_currentRotation + TIME_24_HOURS < now )
+ while( m_currentRotation + TIME_24_HOURS < now )
{
m_currentRotation += TIME_24_HOURS;
}
@@ -130,7 +130,7 @@
public boolean isRotationNeeded( final String data, final File file )
{
final long now = System.currentTimeMillis();
- if ( m_currentRotation + TIME_24_HOURS < now )
+ if( m_currentRotation + TIME_24_HOURS < now )
{
// Needs to be rotated.
return true;
1.18 +6 -6 avalon-logkit/src/java/org/apache/log/output/io/rotate/RotatingFileTarget.java
Index: RotatingFileTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/rotate/RotatingFileTarget.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- RotatingFileTarget.java 9 Feb 2003 23:33:24 -0000 1.17
+++ RotatingFileTarget.java 17 Apr 2003 09:13:48 -0000 1.18
@@ -118,10 +118,10 @@
rotate();
}
- /**
- * Rotates the file.
- * @exception IOException if a file access or write related error occurs
- */
+ /**
+ * Rotates the file.
+ * @exception IOException if a file access or write related error occurs
+ */
protected synchronized void rotate()
throws IOException
{
@@ -144,8 +144,8 @@
try
{
rotate();
-
- m_rotateStrategy.reset ();
+
+ m_rotateStrategy.reset();
}
catch( final IOException ioe )
{
1.8 +15 -15 avalon-logkit/src/java/org/apache/log/output/io/rotate/UniqueFileStrategy.java
Index: UniqueFileStrategy.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/io/rotate/UniqueFileStrategy.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- UniqueFileStrategy.java 9 Feb 2003 23:33:24 -0000 1.7
+++ UniqueFileStrategy.java 17 Apr 2003 09:13:48 -0000 1.8
@@ -82,32 +82,32 @@
private String m_suffix;
- /**
- * Creation of a new Unique File Strategy ??
- * @param baseFile the base file
- */
+ /**
+ * Creation of a new Unique File Strategy ??
+ * @param baseFile the base file
+ */
public UniqueFileStrategy( final File baseFile )
{
m_baseFile = baseFile;
}
- /**
- * Creation of a new Unique File Strategy ??
- * @param baseFile the base file
- * @param pattern the format pattern
- */
+ /**
+ * Creation of a new Unique File Strategy ??
+ * @param baseFile the base file
+ * @param pattern the format pattern
+ */
public UniqueFileStrategy( final File baseFile, String pattern )
{
this( baseFile );
m_formatter = new SimpleDateFormat( pattern );
}
- /**
- * Creation of a new Unique File Strategy ??
- * @param baseFile the base file
- * @param pattern the format pattern
- * @param suffix the suffix ??
- */
+ /**
+ * Creation of a new Unique File Strategy ??
+ * @param baseFile the base file
+ * @param pattern the format pattern
+ * @param suffix the suffix ??
+ */
public UniqueFileStrategy( final File baseFile, String pattern, String suffix )
{
this( baseFile, pattern );
1.11 +7 -7 avalon-logkit/src/java/org/apache/log/output/jms/MessageBuilder.java
Index: MessageBuilder.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/jms/MessageBuilder.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- MessageBuilder.java 9 Feb 2003 23:33:24 -0000 1.10
+++ MessageBuilder.java 17 Apr 2003 09:13:48 -0000 1.11
@@ -68,13 +68,13 @@
public interface MessageBuilder
{
- /**
- * Creation of a new message.
- * @param session the session against which the message will be created
- * @param event the log event
- * @return the message
- * @exception JMSException if a messaging error occurs
- */
+ /**
+ * Creation of a new message.
+ * @param session the session against which the message will be created
+ * @param event the log event
+ * @return the message
+ * @exception JMSException if a messaging error occurs
+ */
Message buildMessage( Session session, LogEvent event )
throws JMSException;
}
1.8 +7 -7 avalon-logkit/src/java/org/apache/log/output/jms/ObjectMessageBuilder.java
Index: ObjectMessageBuilder.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/jms/ObjectMessageBuilder.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ObjectMessageBuilder.java 9 Feb 2003 23:33:24 -0000 1.7
+++ ObjectMessageBuilder.java 17 Apr 2003 09:13:48 -0000 1.8
@@ -70,13 +70,13 @@
implements MessageBuilder
{
- /**
- * Creation of a new message.
- * @param session the session against which the message will be created
- * @param event the log event
- * @return the message
- * @exception JMSException if a messaging error occurs
- */
+ /**
+ * Creation of a new message.
+ * @param session the session against which the message will be created
+ * @param event the log event
+ * @return the message
+ * @exception JMSException if a messaging error occurs
+ */
public Message buildMessage( Session session, LogEvent event )
throws JMSException
{
1.8 +18 -18 avalon-logkit/src/java/org/apache/log/output/jms/PropertyInfo.java
Index: PropertyInfo.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/jms/PropertyInfo.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- PropertyInfo.java 9 Feb 2003 23:33:24 -0000 1.7
+++ PropertyInfo.java 17 Apr 2003 09:13:48 -0000 1.8
@@ -71,12 +71,12 @@
///Auxilliary parameters (ie constant or sub-format)
private final String m_aux; //may be null
- /**
- * Creation of a new property info instance.
- * @param name the property
- * @param type the property type
- * @param aux auxillary property value
- */
+ /**
+ * Creation of a new property info instance.
+ * @param name the property
+ * @param type the property type
+ * @param aux auxillary property value
+ */
public PropertyInfo( final String name, final int type, final String aux )
{
m_type = type;
@@ -84,28 +84,28 @@
m_name = name;
}
- /**
- * Return the property name
- * @return the name
- */
+ /**
+ * Return the property name
+ * @return the name
+ */
public String getName()
{
return m_name;
}
- /**
- * Return the property type
- * @return the type
- */
+ /**
+ * Return the property type
+ * @return the type
+ */
public int getType()
{
return m_type;
}
- /**
- * Return the property auxilliary information
- * @return the information
- */
+ /**
+ * Return the property auxilliary information
+ * @return the information
+ */
public String getAux()
{
return m_aux;
1.13 +24 -24 avalon-logkit/src/java/org/apache/log/output/jms/TextMessageBuilder.java
Index: TextMessageBuilder.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/jms/TextMessageBuilder.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- TextMessageBuilder.java 9 Feb 2003 23:33:24 -0000 1.12
+++ TextMessageBuilder.java 17 Apr 2003 09:13:48 -0000 1.13
@@ -76,21 +76,21 @@
private final PropertyInfo[] m_properties;
private final Formatter m_formatter;
- /**
- * Creation of a new text message builder.
- * @param formatter the message formatter
- */
+ /**
+ * Creation of a new text message builder.
+ * @param formatter the message formatter
+ */
public TextMessageBuilder( final Formatter formatter )
{
m_properties = new PropertyInfo[ 0 ];
m_formatter = formatter;
}
- /**
- * Creation of a new text message builder.
- * @param properties the property info set
- * @param formatter the message formatter
- */
+ /**
+ * Creation of a new text message builder.
+ * @param properties the property info set
+ * @param formatter the message formatter
+ */
public TextMessageBuilder( final PropertyInfo[] properties,
final Formatter formatter )
{
@@ -98,13 +98,13 @@
m_formatter = formatter;
}
- /**
- * Build a message from the supplied session for the supplied event
- * @param session the session
- * @param event the log event
- * @return the message
- * @exception JMSException if a messaging related error occurs
- */
+ /**
+ * Build a message from the supplied session for the supplied event
+ * @param session the session
+ * @param event the log event
+ * @return the message
+ * @exception JMSException if a messaging related error occurs
+ */
public Message buildMessage( final Session session, final LogEvent event )
throws JMSException
{
@@ -122,12 +122,12 @@
}
}
- /**
- * Set a property
- * @param message the text message
- * @param index the index
- * @param event the log event
- */
+ /**
+ * Set a property
+ * @param message the text message
+ * @param index the index
+ * @param event the log event
+ */
private void setProperty( final TextMessage message,
final int index,
final LogEvent event )
@@ -191,7 +191,7 @@
private String getStackTrace( final Throwable throwable )
{
- if( null == throwable )
+ if( null == throwable )
{
return "";
}
@@ -205,7 +205,7 @@
private String getContextMap( final ContextMap map, final String aux )
{
- if( null == map )
+ if( null == map )
{
return "";
}
1.7 +6 -6 avalon-logkit/src/java/org/apache/log/output/net/SMTPOutputLogTarget.java
Index: SMTPOutputLogTarget.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/output/net/SMTPOutputLogTarget.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SMTPOutputLogTarget.java 9 Feb 2003 23:33:25 -0000 1.6
+++ SMTPOutputLogTarget.java 17 Apr 2003 09:13:49 -0000 1.7
@@ -143,7 +143,7 @@
try
{
// ensure we have a message object available
- if ( m_message == null )
+ if( m_message == null )
{
m_message = new MimeMessage( m_session );
m_message.setFrom( m_fromAddress );
@@ -160,12 +160,12 @@
++m_msgSize;
// send mail if message size has reached it's size limit
- if ( m_msgSize >= m_maxMsgSize )
+ if( m_msgSize >= m_maxMsgSize )
{
send();
}
}
- catch ( MessagingException e )
+ catch( MessagingException e )
{
getErrorHandler().error( "Error creating message", e, null );
}
@@ -198,14 +198,14 @@
{
try
{
- if ( m_message != null && m_buffer != null )
+ if( m_message != null && m_buffer != null )
{
m_message.setText( m_buffer.toString() );
Transport.send( m_message );
m_message = null;
}
}
- catch ( MessagingException e )
+ catch( MessagingException e )
{
getErrorHandler().error( "Error sending message", e, null );
}
1.2 +1 -1 avalon-logkit/src/java/org/apache/log/util/Closeable.java
Index: Closeable.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/util/Closeable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Closeable.java 28 Feb 2003 23:40:20 -0000 1.1
+++ Closeable.java 17 Apr 2003 09:13:49 -0000 1.2
@@ -56,7 +56,7 @@
/**
* Interface implemented by LogTargets that are capable of being
- * closed.
+ * closed.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
*/
1.3 +2 -2 avalon-logkit/src/java/org/apache/log/util/LogKit2AvalonLoggerAdapter.java
Index: LogKit2AvalonLoggerAdapter.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/util/LogKit2AvalonLoggerAdapter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LogKit2AvalonLoggerAdapter.java 17 Apr 2003 09:11:42 -0000 1.2
+++ LogKit2AvalonLoggerAdapter.java 17 Apr 2003 09:13:49 -0000 1.3
@@ -90,7 +90,7 @@
final org.apache.log.Logger logKitLogger = hierarchy.getLoggerFor( "" );
final LogKit2AvalonLoggerAdapter target =
new LogKit2AvalonLoggerAdapter( logger );
- logKitLogger.setLogTargets( new LogTarget[ ] { target } );
+ logKitLogger.setLogTargets( new LogTarget[]{target} );
return logKitLogger;
}
1.5 +0 -4 avalon-logkit/src/java/org/apache/log/util/LoggerListener.java
Index: LoggerListener.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/util/LoggerListener.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LoggerListener.java 9 Feb 2003 23:33:25 -0000 1.4
+++ LoggerListener.java 17 Apr 2003 09:13:49 -0000 1.5
@@ -54,11 +54,7 @@
*/
package org.apache.log.util;
-
-
import org.apache.log.Logger;
-
-
/**
1.14 +7 -7 avalon-logkit/src/java/org/apache/log/util/StackIntrospector.java
Index: StackIntrospector.java
===================================================================
RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/util/StackIntrospector.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- StackIntrospector.java 9 Feb 2003 23:33:25 -0000 1.13
+++ StackIntrospector.java 17 Apr 2003 09:13:49 -0000 1.14
@@ -130,7 +130,7 @@
public static final Class getCallerClass( final Class clazz )
throws SecurityException
{
- return getCallerClass(clazz, 0);
+ return getCallerClass( clazz, 0 );
}
/**
@@ -143,7 +143,7 @@
* @exception SecurityException if an existing SecurityManager disallows construction
* of another SecurityManager and thus blocks method results
*/
- public static final Class getCallerClass(final Class clazz, int stackDepthOffset)
+ public static final Class getCallerClass( final Class clazz, int stackDepthOffset )
{
final Class[] stack = getCallStack().get();
@@ -153,7 +153,7 @@
if( clazz.isAssignableFrom( stack[ i ] ) )
{
// Found : the caller is the previous stack element
- return stack[ i + 1 + stackDepthOffset];
+ return stack[ i + 1 + stackDepthOffset ];
}
}
@@ -196,7 +196,7 @@
{
case 0:
//Strip the first line from input
- if( '\n' == ch )
+ if( '\n' == ch )
{
state = 1;
}
@@ -292,7 +292,7 @@
{
case 0:
//Strip the first line from input
- if( '\n' == ch )
+ if( '\n' == ch )
{
state = 1;
}
@@ -337,7 +337,7 @@
//We are looking at the callers of Clazz
stack.append( method );
entries--;
- if( entries == 0 )
+ if( entries == 0 )
{
return stack.toString();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org