Skip to main content

Agent Log

When the application server runs, it starts collecting the monitoring data. The collected data is stored in the log file.

Log setting​

log_keep_days Day

Default 7

Set the retention period of log files.

Setting the LogSink​

It is used to log data.

Default settings​

  • logsink_enabled Boolean

    Default false

    If the value is true, the log data is collected.

  • logsink_stdout_enabled Boolean

    Default false

    If the value is true, standard output logs are collected.

  • logsink_stderr_enabled Boolean

    Default false

    If the value is true, standard error output logs are collected.

  • logsink_zip_enabled Boolean

    Default true

    If the value is true, the zipped log data is transmitted. The default value is GZIP.

Setting the log file​

  • logsink.files String

    You can set the full path and file name of the log file to be collected. To set multiple files, use comma (,) as the delimiter.

Example​

See the following example and then apply the agent settings for your environment.

whatap.conf
logsink_enabled=true
logsink_stdout_enabled=true
logsink_stderr_enabled=true
logsink_zip_enabled=true
logsink.files=/etc/httpd/logs/error_log, /etc/httpd/logs/access_log
Tip

You can use any variable in date format in log file names. Apply it based on the use of the Python strftime().

e.g. 20240101: %Y%m%d

whatap.ini
whatap.logsink.files=/etc/httpd/logs/customlog-%Y%m%d

This function is supported in Go agent 0.3.2 or later.

Note

For the API guide on log settings, see the following.