2024/07/22 - 04:50 - 8833v
Last modified 2011/11/21

Forlix SrcDS LogMerge (2008/11)

Source™ gameservers generally start a new logfile on each mapchange, and therefore produce around 20-60 files a day. For quick and easy searching and analysis of this data I have created this tool. It takes into account timestamps and file contents of the logs to determine if they are terminated and allowed to be processed. It can be run in a live server logs directory (with the server running and writing logs), and will not interfere with the log generation by ignoring recent files using a well defined set of rules.

I run this tool scheduled once a day in the early morning, so that I can already access the complete previous day (and all others within the current month) in one file. If the server has logflush enabled (write to file after every line), this won't be a problem, as the program also checks the last line of the most recent file, to see if the log was closed. The program also takes care not to merge files dated earlier than the most recent line of the merged log, if one already exists.

The program scans its current working directory for logfiles to process - you can change the directory it scans by setting its working directory via a Windows Shortcut or using Scheduled Tasks.

Changes in v1.0: (2008/11)

  • Initial release

Changes in v1.1: (2008/11)

  • Added logfile name length check

Changes in v1.2: (2008/12)

  • Added check if mergedlog contains more recent timestamp than what is to append and if so, do not append the logfile in question

Changes in v1.3: (2010/12)

  • Major code optimizations and now using scanf instead of PCRE regex

Changes in v1.31: (2011/11)

  • Added empty logfile auto-delete feature

Source™ server logfile merging tool
Source™ server logfile merging tool

Forlix SrcDS LogMerge v1.31
License: GPL (Windows® executable)

Source code (MSVC6 project)

© 2006-2011 | Terms of use | Contact

Powered by Apache 2.2

Powered by Perl        Valid XHTML 1.1