Logging

From Soldat Developers' Wiki
Jump to: navigation, search

Both the server and the client support logging. To turn on this feature, edit your soldat.ini file, changing the line "Logging=0" to "Logging=1". The logging is done in plain ASCII Windows-formated files, placed in the logs/ folder , with extension ".txt". There are five types of log files used by the server:

Console Logs -> logs/ConsoleLog-*.txt
Kill Logs -> logs/kills/*.txt
Server Logs -> logs/Log-*.txt
Live stats -> logs/gamestat.txt
Server's PID -> logs/soldatserver.pid  [!] This can be changed using command line arguments. 
Note: PID stands for Process ID.

Logging formats

There are currently two logging formats, which can be switched from the variable "OldLogFilesFormat" found in server.ini and affect server,kills and console logs only.

## OldLogFilesFormat=1 [!] Only format pre 1.4.1
logs/consolelog-1.txt
logs/log-1.txt
logs/kills/killlog-1.txt
logs/consolelog-2.txt
logs/log-2.txt
logs/kills/killlog-2.txt
logs/consolelog-3.txt
logs/log-3.txt
logs/kills/killlog-3.txt
logs/consolelog-4.txt
logs/log-4.txt
logs/kills/killlog-4.txt
## Old LogFilesFormat=0 [!] Default, reccomended
Log-07-11-02-01.txt
ConsoleLog-07-11-02-01.txt
KillLog-07-11-02-01.txt
Log-07-11-02-02.txt
ConsoleLog-07-11-02-02.txt
KillLog-07-11-02-02.txt
Log-07-11-02-03.txt
ConsoleLog-07-11-02-03.txt
KillLog-07-11-02-03.txt
Log-07-11-03-01.txt
ConsoleLog-07-11-03-01.txt
KillLog-07-11-03-01.txt

In both cases, a new file is started each time the server is restarted or the max. file size, set in the soldat.ini file is reached. The file gamestat.txt updates every x number of ticks, set by the variable LogFilesUpdate.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox