Manually enabling logging
April 24, 2024
ID 179928
This section describes how to enable logging manually.
You can separately enable logging for Kaspersky Anti-Virus Engine
Logging significantly reduces Kaspersky Scan Engine performance. You are advised to use logging only for debugging purposes.
Enabling logging for Kaspersky Anti-Virus Engine
By default, Kaspersky Scan Engine does not log KAV Engine events.
To enable logging in Kaspersky Anti-Virus Engine:
- Create a file named kave.ini in the ppl subdirectory of the installation directory.
- Add the following lines to kave.ini:
[LOGGING]
WriteLog=9
- Specify other parameters, if they are needed.
- Save and close kave.ini.
- Restart the Kaspersky Scan Engine service:
- In HTTP mode, restart the kavhttpd service.
- In ICAP mode, restart the kavicapd service.
Logging settings for the kavicapd/kavhttpd service and Kaspersky Anti-Virus Engine are synchronized on start and restart of the klScanEngineUI service. Kaspersky Scan Engine sets the logging level (WriteLog
) and log directory (LogsFolder
) in kave.ini to be the same as specified in the DebugLogging
section of icapdkavlog.conf (for ICAP mode) or httpdkavlog.ini (for HTTP mode).
Enabling logging in HTTP mode
By default, logging in HTTP mode is disabled. Kaspersky Scan Engine checks for the httpdkavlog.ini logging configuration file when the kavhttpd service starts. If this file exists, Kaspersky Scan Engine reads parameters from it.
To enable logging for the kavhttpd service:
- Create a file named httpdkavlog.ini in the directory where the kavhttpd binary file is located.
- Change the value of the
<LogLevel>
element to1
. - Specify the rest of the parameters, if needed.
- Save and close httpdkavlog.ini.
- Restart the kavhttpd service.
Enabling logging in ICAP mode
By default, logging in ICAP mode is disabled. Kaspersky Scan Engine checks the icapdkavlog.conf logging configuration file when the kavicapd service starts.
To enable logging for the kavicapd service:
- Open the icapdkavlog.conf logging configuration file.
- Specify
debug
ordbg
in the<Level>
element. - Specify other parameters, if they are needed.
- Save and close icapdkavlog.conf.
- Restart the kavicapd service.
Enabling logging in Kaspersky Scan Engine GUI
To enable logging in Kaspersky Scan Engine GUI:
- Enable logging in the configuration file that corresponds to the selected Kaspersky Scan Engine mode (HTTP or ICAP).
- If HTTP mode is used, enable logging in the httpdkavlog.ini logging configuration file.
- If ICAP mode is used, enable logging in the icapdkavlog.conf logging configuration file.
- In Kaspersky Scan Engine GUI, go to Settings → Logging and enable logging.
You can enable or disable logging in Kaspersky Scan Engine GUI without restarting the kavicapd or kavhttpd service.