If is not set, this property
setting is ignored.
You can override other rolling log file defaults by setting
or
.
A pattern consists of a string that includes the following special components
that will be replaced at runtime.
Rolling log file pattern components
This table lists and describes the components of the rolling log file naming pattern.
Pattern component
Description
/
Local path name separator
%t
The system temporary directory
%h
The value of the user.home system property
%d
The value of the derby.system.home system property
%g
The generation number to distinguish rotated log files.
Generation numbers follow the sequence 0, 1, 2, and so on. If you do not specify
a %g field and the file count is greater than one, the
generation number will be added to the end of the generated filename, after a
dot.
%u
A unique number to resolve conflicts.
%%
Translates to a single percent sign (%)
Thus, for example, a derby.stream.error.rollingFile.pattern setting of
%t/java%g.log with a
derby.stream.error.rollingFile.count setting of 2 might cause log files
on a UNIX system to be written to /var/tmp/java0.log and
/var/tmp/java1.log, whereas on a Windows 7 system they might be written
to %USERPROFILE%\AppData\Local\Temp\java0.log and
%USERPROFILE%\AppData\Local\Temp\java1.log.
Normally, the %u unique field is set to 0 (zero). However,
if tries to open the
file by the specified name and finds that the file is currently in use by
another process, it will increment the unique number field and try again. This
action will be repeated until
finds a file name that
is not currently in use. If there is a conflict and no %u field
has been specified, the unique number will be added at the end of the filename
after a dot. (This will be after any automatically added generation number.)
For example, if three processes are all trying to log to
fred%u.%g.txt, they might have log files named
fred0.0.txt, fred1.0.txt, fred2.0.txt as the first file in
their rotating sequences.
The use of unique fields to avoid conflicts is guaranteed to work reliably
only when you are using a local disk file system.