IW5-Mod Logging System

On IW4x-SP and IW5-Mod, the logging system received a fix that was backported from IW6 Dedicated Servers.

Logging is controlled by the dvar logfile. This dvar can have the following values:

  • 0: Logging is disabled.
  • 1: Logging is enabled.
  • 2: Logging is enabled, and the file is flushed after each write.

When the game starts and logging is enabled, a file named console.log is created. If this file already exists, the game renames it to a backup file such as console.log.000, up to console.log.019, allowing for a maximum of 20 backups.

If you open more than one instance of the game, the logging system will attempt to find the first available backup file to write to, as console.log will already be in use by the first instance.

The game overwrites the oldest existing log file if all backup slots are filled.