Table of Contents

Search

  1. Preface
  2. Introduction to TDM Administration
  3. User and Role Administration
  4. Security Administration
  5. System Preferences
  6. TDM Server Administration
  7. Connections
  8. Pass Phrases
  9. Global Parameters
  10. Dictionaries
  11. User-Defined Datatypes

Administrator Guide

Administrator Guide

Log Location and Archives

Log Location and Archives

You can change the location where the TDM Server writes log files. You can also configure log file archiving.
When you configure
logback.xml
, you can configure archiving for the client log, event log, the server log.
The following table describes the properties that you configure for the log location and archiving:
Property
Description
file
The file path for the log file with reference to the TDM installation directory.
FileNamePattern
The file path and the naming convention for archived log files with reference to the TDM installation directory. Use the
%i
modifier archive files by number. Use the
%d
modifier to archive files by date. To save directory space, use .gz or .zip when you archive files.
For example, you might specify the following file name pattern:
<TDM installation directory>/configuration/logs/tdm_%i.log
MaxFileSize
The maximum size for a log file. You can configure a file size in bytes, kilobytes, megabytes, or gigabytes. Default is 10 MB.
MaxIndex
The maximum number of log files that the TDM Server will create. The TDM Server will not create more than 12 log files even if you configure a size greater than 12. Default is 4.

Archive Example

Your organization wants to configure the archive specification for the server log,
tdm.log
.
You configure the maximum file size to be 8 MB, and you configure the maximum number of files to be seven. The TDM Server uses the following process to manage the server log:
  1. The first time you start the TDM Server, it creates a file named
    tdm.log
    .
  2. It continues to write to the file until the file reaches a size of 8 MB.
  3. When the file reaches 8 MB, it renames the file to
    tdm_1.log.zip
    , and it creates another log named
    tdm.log
    .
  4. When
    TDM.log
    reaches 8 MB, it renames
    tdm_
    n
    .log.zip
    to
    tdm_
    n+1
    .log.zip
    , and it creates another server log named
    tdm.log
    .
  5. The TDM Server continues to rename the log files until it reaches the maximum index of seven, and it overwrites the oldest log file.
The following snippet of code shows the configuration for the server log.
<appender name="TDM_LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>logs/tdm.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <FileNamePattern>logs/tdm_%i.log</FileNamePattern> <MinIndex>1</MinIndex> <MaxIndex>10</MaxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <MaxFileSize>10MB</MaxFileSize> </triggeringPolicy> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <Pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}]\t[%logger]\t[%X{username}]\t[%X{context}]\t[%level]\t[%msg %ex]%n</Pattern> </encoder> </appender>

0 COMMENTS

We’d like to hear from you!