News for hackers. Stuff that matters.
Re:Logging Sucks by mrkeen on Monday December 22, 2025 @12:42AM (#46351692)
> You're coupling logging with business logic

Yes, the system shall not report that "User null was created" if it was actually "User 123 that was created".

String? Not a chance, make a proper type-safe struct. UserCreated { "id": 123}

> I don't want to have to think if i change a debug string am i going to break something.

Good point, you should probably have a unit test somewhere.

There are no comments on this comment yet.