Debugging TADS3 on Linux

Yeah, for “just” debug-by-printf() stuff I also wrote the syslog module, which defines a Syslog class you can use as a mixin.

It provides a _debug() method. The simplest usage is a single argument, a text literal. It’s output only if the game is compiled with -D SYSLOG.

You can also provide a second optional argument as a logging tag/ID. Logging tags can be turned on and off via syslog.enable(id) and syslog.disable(id).

All instances of Syslog can also optionally define a syslogID property. If defined, it will be prepended onto each line of debugging output.

3 Likes