3.5.2 Debug logging

Debug logging can be used to identify issues with connections. It provides debug level details for each connections as well as the time each step took (e.g. parsing time, scan time, response time). It also tracks the number of active connections.

Important notes

Debug logging is not designed to be constantly enabled. It should only be used for investigating issues for short periods of time.

Keeping it enabled permanently may impact performances. If running for too long, the log file can become huge and significantly reduce the available disk space.

In each case below, both of logfile and loglevel must be set or none of them.

Step-by-step guide

Enable debug logging

Perform the following steps to enable debug logging:

  1. Make sure MetaDefender Email Gateway Security is stopped

    > net stop mdemailsecurity
  2. Open the Windows Registry with regedit. Go to the HKEY_LOCAL_MACHINE\SOFTWARE\OPSWAT\Metadefender Email Security\logger entry

  3. Add or modify the following entries with the following values:

    1. loglevel: debug

    2. logfile: Path to the logfile, for example C:\Program Files\OPSWAT\Metadefender Email Security\data\mdemailsecurity.log

      Please note that the directory path must exist, logs are not written if the directory is not present.

  4. Close the registry editor

  5. Start MetaDefender Email Gateway Security

    > net start mdemailsecurity

Disable debug logging

Perform the following steps to disable debug logging:

  1. Make sure MetaDefender Email Gateway Security is stopped

    > net stop mdemailsecurity
  2. Open the Windows Registry with regedit. Go to the HKEY_LOCAL_MACHINE\SOFTWARE\OPSWAT\Metadefender Email Security\logger entry

  3. Delete the following entries:

    1. loglevel

    2. logfile

  4. Close the registry editor

  5. Start MetaDefender Email Gateway Security

    > net start mdemailsecurity

The log level debug can also be set for the wineventlog_level entry. Sending debug logs to the Windows Events would, however, flood the Event Viewer and as so it is not recommended.