Menu

#52 FileHandler .limit default incorrect

open
nobody
5
2002-05-08
2002-05-08
insitedata
No

The JDK appears to be using a default .limit value of
0. LumberJack, is using -1. Constructing a new
FileHandler using the JDK default value for limit
yields the following exception:

java.lang.IllegalArgumentException: File size must be
at least 1 or not constrained

The Lumberjack code in FileHandler's is the following:

if ( limit == 0 ) {
throw new IllegalArgumentException( "File size
must be at least 1 or not constrained" );
}

Here is the Sun JDK 1.4 JavaDoc description of
the .limit property:
Java.util.logging.FileHandler.limit specifies an
approximate maximum amount to write (in bytes) to any
one file. If this is zero, then there is no limit.
(Defaults to no limit).

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.