We have a system that generates lots of logs and we have to somehow maintain logging workflow in a project.
The 'strict' (let's assume it's strict) requirement is that there should be a document describing format for each message and each message should comply to that format.
(By format I mean BNF-like things like 'some text {one|two} [three]'
etc.
It's also desirable to see log messages themselves in the code, not some IDs referring to them in some 'message list'.
Currently the state is that there is a large file with 1000+ messages with IDs, severities and user actions described for each one, and in the main code we are just struggling to keep log messages exactly in the format we specified (and of course failing in that).
It isn't obviously a viable option to like parse the source code on build and try to ensure message format that way (messages can be written not literally etc.).
So, how to implement such a format-complying logging system?
I know it sounds a bit like a 'advise me some tool'-kind-of-question, but I still think it's more about conceptual approaches to the problem (yet still I'd be really glad to see example of such systems! :) language doesn't matter).