We do some per-tool logging to files, mainly for local convenience. However, our main studio method of tracking tools telemetry is with a central database. It goes something like this…
I wrote a new handler for the “logging” module in the Python standard library, that emits logging events to our MS SQL database. That includes info, warning, errors and everything else. At any time we can query these records for events we care about, measure time of various processes in our tools, and track errors. That data can be tossed into graphs or reports, whatever.
I also added a second handler that emits events that are error level and above to a HTML-formatted email. Those are sent instantly from the user’s machine to a list monitored by our TAs and other tool developers. The messages include the callstack, build number, other diagnostic data, even one-click links to hop us to relevant places in the code. This error info is also in the database of course, but having it instantly go out in email is a very nice convenience.
This logger gets auto-configured a bit differently based on user location. If they are not on the main Volition network it skips the database handler, logging to a file instead, but typically still does the email emits. This is still very useful for keeping an eye on things at outsourcing studios.
The database handler I wrote uses SQLAlchemy on the backend, which I’m still a big fan of after all these years. Semi-related, I gave a talk at the TA Bootcamp at GDC 2012 about databases and their use in TA applications. Slides are here:
The audio recording of that Bootcamp is available here, if you have GDC Vault access:
https://store.cmpgame.com/product/6205/Technical-Artist-Boot-Camp
As for what to log, that depends entirely on what you want logging to tell you. I would not recommend trying to log “everything” and assume you can draw useful conclusions from that data later. Have questions in mind that you’d like to answer before you start logging. Your data will be much more useful as a result.
Same goes for the data-analysis method. How/where you log things should be based on how you want to look at the data. Maybe a central DB is a good fit, but that might not be feasible from an IT standpoint, and a network folder full of per-user log files might be a better fit for you.