This article's documentation is for anything that uses the Source engine. Click here for more information.

Timestamped.log: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Move User:CHILLMODEA/Pages/timestamped.log out of userspace)
 
(Replace "timestamped.log is a" with Template:This is a)
 
Line 1: Line 1:
{{DISPLAYTITLE:timestamped.log}}
{{DISPLAYTITLE:timestamped.log}}
[[File:Timestamped.log.png|thumb|right|375px|An example of the {{code|timestamped.log}} file, as exported from a modified {{hl2|1}}.]]
[[File:Timestamped.log.png|thumb|right|375px|An example of the {{code|timestamped.log}} file, as exported from a modified {{hl2|1}}.]]
{{code|timestamped.log}} is a log file internally created and referenced by the {{source|4}} engine. Using the {{code|COM_TimestampedLog}} function, arbitrary log entries can be added to this file, prepended by the current timestamp.
{{this is a|log file|name={{code|timestamped.log}}|internal=1}}. Using the {{code|COM_TimestampedLog}} function, arbitrary log entries can be added to this file, prepended by the current timestamp.


The file will only be generated on the {{x360|4}}, or with the {{code|-profile}} / {{code|-etwprofile}} command line arguments. Alternatively, the assembly of {{code|COM_TimestampedLog}} can be patched to permanently enable the logging.
The file will only be generated on the {{x360|4}}, or with the {{code|-profile}} / {{code|-etwprofile}} command line arguments. Alternatively, the assembly of {{code|COM_TimestampedLog}} can be patched to permanently enable the logging.

Latest revision as of 13:17, 13 July 2025

An example of the timestamped.log file, as exported from a modified Half-Life 2.

timestamped.log is an internal log file available in all Source Source games.. Using the COM_TimestampedLog function, arbitrary log entries can be added to this file, prepended by the current timestamp.

The file will only be generated on the Xbox 360 Xbox 360, or with the -profile / -etwprofile command line arguments. Alternatively, the assembly of COM_TimestampedLog can be patched to permanently enable the logging.

The log is used extensively throughout the engine, almost two hundred times[1]. At a high level, everything the game does is documented in the log. As such, it is quite good for finding issues / crash points, better than most other logging methods.

References

References
1. Every reference to the COM_TimestampedLog function in the engine code, as exported from grep.
COM TimestampedLog.png.