Controlling logging level, log file sizes, rotation count, and locale v7
Note
These options apply to the publication server and the subscription server unless otherwise specified.
The following options control various aspects of message logging in the publication server log file, the subscription server log file, and the Migration Toolkit log file.
See Publication and subscription server startup failures and Snapshot replication failures for more information.
logging.level
Set the logging.level
option to control the severity of messages written to the publication server log file and the subscription server log file.
logging.level={OFF | SEVERE | WARNING | INFO | CONFIG | FINE | FINER | FINEST | ALL}
The default value is WARNING
.
logging.file.size
Set the logging.file.size
option to control the maximum file size (in megabytes) of the publication server log file and the subscription server log file.
Note
If logging.file.count
is set to 0
, the setting of logging.file.size
is ignored. The log file is allowed to grow without limit.
logging.file.size=n
The default value is 50
, in megabytes.
logging.file.count
Set the logging.file.count
option to control the number of files in the log file rotation history of the publication server log file and the subscription server log file.
logging.file.count=n
The default value is 20
.
A non-zero value of n specifies the maximum number of log files to create.
Note
The publication server log file named pubserver.log
is used here as an example. For the subscription server, the log file is named subserver.log
.
- Specify a value of
0
to disable log file rotation and create a single, unlimited size log file namedpubserver.log
. This log file will grow to an unlimited size, ignoring any setting oflogging.file.size
. - Specify a value of
1
to disable log file rotation and create a single, limited-size log file namedpubserver.log
. The log file is deleted and a new one is created each time the log file reaches the size limit set bylogging.file.size
. - Specify a value of
2
or greater to enable log file rotation. All log file names have an integer suffix (for example,pubserver.log.0
,pubserver.log.1
,pubserver.log.2
).
When log file rotation is enabled, the log file with the greatest integer suffix contains the oldest messages. When there are enough messages to generate every file in the history rotation, the oldest messages are in pubserver.log.n-1
, where n is the setting of logging.file.count
. Log file pubserver.log.0
is the current, active log file containing the most recent messages.
When log file rotation is enabled and the current, active log file (pubserver.log.0
) reaches the size specified by logging.file.size
, then the following events occur:
- The log file containing the oldest messages (
pubserver.log.n-1
) is deleted. - Each remaining log file is renamed with the next greater integer suffix (
pubserver.log.m
is renamed topubserver.log.m+1
, with m varying from0
ton-2
). - A new, active log file is created (
pubserver.log.0
).
logging.default.locale
Set the logging.default.locale
option to use either the current system locale or English (en) for publication and subscription logs.
logging.default.locale={system | en}
The default value is system
.
Note
This option is applicable only for publication and subscription logs and isn't supported for mtk.log
.
The RepCLI and RepConsole logs continue showing text in the default locale.
mtk.logging.file.size
Note
This option applies only to the publication server.
Set the mtk.logging.file.size
option to control the maximum file size (in megabytes) of the Migration Toolkit log file.
mtk.logging.file.size=n
The default value is 50
, in megabytes.
mtk.logging.file.count
Note
This option applies only to the publication server.
Set the mtk.logging.file.count
option to control the number of files in the log file rotation history of the Migration Toolkit log file.
mtk.logging.file.count=n
The default value for n is 20
.
A non-zero value of n specifies the maximum number of history log files to create.
- Specify a value of
0
to disable log file rotation and create a single, limited-size log file namedmtk.log
. The log file is deleted and a new one is created each time the log file reaches the size limit set bymtk.logging.file.size
. - Specify a value of
1
or greater to enable log file rotation. All log file names have an integer suffix (for example,mtk.log.1, mtk.log.2
).
When log file rotation is enabled, the log file with the greatest integer suffix contains the oldest messages. When there are enough messages to generate every file in the history rotation, the oldest messages are in mtk.log.n
, where n
is the setting of mtk.logging.file.count
.
Log file mtk.log
is the current, active log file containing the most recent messages.
When the current, active log file (mtk.log
) reaches the size specified by mtk.logging.file.size
, then the following events occur:
- The log file containing the oldest messages (
mtk.log.n
) is deleted. - Each remaining log file with a suffix is renamed with the next greater integer suffix (
mtk.log.m
is renamed tomtk.log.m+1
, withm
varying from1
ton-1
). - Log file
mtk.log
is renamed tomtk.log.1
. - A new, active log file is created (
mtk.log
).