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.
-
Under Project Menu, select Management > Agent CONFIG..
-
In Write options, select Direct Input. Add the
logsink_enabled=true
option to the input field as follows: -
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.
CautionBefore 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 thelogsink_enabled
option is set totrue
before running the application, log monitoring is possible without a separate setting.NoteIf 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.
Javapackage io.home.test;
public class MyLog {
public void customLog(String log) { ... }
}whatap.confhooklog_custom_methods=io.home.test.MyLog.customLog
-
logsink_enabled Boolean
Default
false
It turns on or off Log Monitoring.
CautionBefore 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.
- If you turn on , the log monitoring is enabled. You can try for free for 15 days from the activation date.
- If you turn off , the log monitoring is disabled. Logs are no longer saved.
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.