Document Type | Technical Information
Category | Administration
Applicable Product Versions | 6FS01, 6FS02, 6FS03, 6FS04, 6FS05, 6FS06, 6FS07, 6FS07PS, 7FS01, 7FS02, 7FS02PS, 5SP1FS06
Document Number | TADTI006
Overview
CLI logs are configured to record connection and operation history of clients accessing the database through the CLI.
(Example: tbesql program, tbsql, ODBC)
Method
NoteThis procedure is performed in environments where the operating system (OS) is Linux or Windows.
CLI log settings can be specified either in the tbdsn.tbr file or via environment variables. If both are set, the tbdsn.tbr settings take precedence.
How to configure the tbdsn.tbr file
- TBCLI_LOG_LVL: Specifies the log level for the CLI.
- TBCLI_LOG_DIR: Specifies the directory where CLI log files are saved.
Example configuration
[tbdsn.tbr] tibero=( (INSTANCE=(HOST=localhost) (PORT=8629) (DB_NAME=tibero) ) ) TBCLI_LOG_LVL=TRACE TBCLI_LOG_DIR=/home/test/log- Log level types
Level | Description |
|---|---|
FATAL | Used when a critical error occurs (program termination required) |
ERROR | Error occurred, but the operation continues |
WARN | Used when attention is needed though it is not an error |
DEBUG | Records key progress (e.g., API calls) |
TRACE | Records very detailed debugging information (e.g., memory dumps) |
INTERNAL | Top-level detailed logging (for internal debugging, such as lock information) |
How to set environment variables
- Linux example
export TBCLI_LOG_LVL=TRACE export TBCLI_LOG_DIR=/home/test/log
- Windows example
[Figure 1. Windows System Environment Variable Settings Screen]
Note[Default CLI Log Directory]
Windows: C:\
UNIX/Linux: /tmp
Log file name format: tbcli_YYYYMMDDHHMMSS_PID.log