For the last 2 years I've working in prototypes for my games. And I started to make this small template to use it. Now it's solid enough to talk about. This my start of this conversation. Today I'm explaining why and how I've my logger.

Keep in mind, all code is AGPL, so if you copy this code your codebase will be AGPL.

All feedback is welcome.

all 2 comments

sorted by: hot top controversial new old
[–] 4 points 2 weeks ago (1 child)

Getting a logger into the template early is a good call, probably the bit I'd leave till way too late. Nice of you to share it

  • source
  • hideshow 1 child comment
  • [–] [S] 2 points 2 weeks ago

    To be honest, this wasn't the first Singleton I added... But it's the entry point for my template at least. Since this is important when you have prototypes from 2 years ago that I want to pick something else. And the engine updated, and I don't know what to do.

    But yeah, agree the earlier the Log exists, better it is.

  • source
  • parent
  • 1 comment in c/godot@programming.dev view that post
    [–] 1 point 2 weeks ago

    For a prototype Logger, the thing that saves me most is cheap context tags (scene + system) on every line so you can grep one subsystem after you abandon half the experiment.

    Second: a "debug only" channel that is a no-op in export builds — keeps the habit of logging freely without shipping noise.

    Curious how you handle log volume when a prototype runs for weeks and the file grows — rotate, ring buffer, or just wipe between sessions?

  • source