Logging

This is a technical topic, generally only of interest to server administrators and developers.

On any large game server, it's impossible to watch everything all the time, no matter how much staff you hire. A smart level of logging balances the ability to review what happened when you weren't looking with the need to maintain game performance and manage storage space.

Ideally, server developers would solve every problem proactively with design and code rather than reactively by constantly reviewing logs and taking corrective action so that players get the best experience up front, rather than having to wait for someone to fix what troubles them. Nonetheless, logs are a part of every real life server implementation because sometimes new problems arise that don't have proactive solutions yet, while some other problems are extremely difficult (or prohibitively expensive) to solve with code, like bad social behavior from players in chat.

Separate Logs for Separate Tasks
Administators shouldn't have to visually scan very long, diverse log files for important information. Tohm keeps several logs, each focused on a specific administrative task. For example, exceptions (it's a programming thing) go to one log, while user command line errors go to another.

Bounds on Log Size
Each of Tohm's logs automatically breaks itself up into smallish files (organized by time) so that no administrator ever has to struggle with a log file that's too huge to open quickly. This can also help adminstrators pick the right "chunk" of a log when they know the time period they're interested in. Most importantly, the total size of a log (the sum of its files) has a maximum limit, and when it grows too large, the oldest individual file can be deleted to make room for more. This means there's no need to administrators to monitor log sizes and delete old data manually to avoid disk space problems.

Modify, Read, and Delete During Uptime
Tohm doesn't keep log files open all the time, which means administrators can examine them as needed, without having to stop the server or temporarily disable logging.

In-Memory Caching for Better Performance
Tohm doesn't open-write-close for every log entry, because that would be an unwise allocation of server resources. Log entries live in memory, and are written out to file in a throttled batches gradually over time.