Skip to main content

Java

To collect logs from your Java application, complete the following 3 steps:

Agent Update

It is available from Java agent 2.1.1. For more information about update, see the following.

Checking the agent settings

Home > Select Project > Log > Log Setting

Select a project in the initial screen of the WhaTap monitoring service, and then select Log > Log Setting under Project Menu. Proceed with the process according to the instructions in the Check agent settings tab of the Getting started with log monitoring section.

  1. Under Project Menu, select Management > Agent CONFIG..

  2. In Write options, select Direct Input. Add the logsink_enabled=true option to the input field as follows:

    Agent log configuration

  3. Restart the application to apply the log monitoring.

Key options

  • hooklog_enabled Boolean

    Default false

    It enables the log monitoring by hooking the log library.

    Caution

    Before running the application, this option must have been enabled in whatap.conf to dynamically turn on or off the monitoring through the logsink_enabled setting. If the logsink_enabled option is set to true before running the application, log monitoring is possible without a separate setting.

    Note

    If there is a possibility to use the log monitoring, it is recommended to set this option in advance.

  • hooklog_custom_methods

    Register a custom log. An arbitrary log framework content is delivered. Use this to trace logs of the log module created on the website.

    Java
    package io.home.test;

    public class MyLog {
    public void customLog(String log) { ... }
    }
    whatap.conf
    hooklog_custom_methods=io.home.test.MyLog.customLog
  • logsink_enabled Boolean

    Default false

    It turns on or off Log Monitoring.

    Caution

    Before running the application, if in whatap.conf, the hooklog_enabled option is set, this option can dynamically turn on or off the log monitoring.

  • logsink_trace_enabled Boolean

    Default false

    Set whether or not to expose the log tab of the transaction trace by inserting the transaction ID into the logs.

Enabling the log monitoring

Home > Select Project > Log > Log Setting

You can enable or disable the WhaTap log monitoring with the toggle button in the Activate log monitoring tab of the Starting the log monitoring section.

Starting the log monitoring

  • If you turn on Icon, the log monitoring is enabled. You can try for free for 15 days from the activation date.
  • If you turn off Icon, the log monitoring is disabled. Logs are no longer saved.
Note

Role

After agent installation, you can enable the log monitoring settings only when you have the edit permission on the project. For more information about the roles, see the following.