Prototype with some usage examples here:  
https://github.com/cyrusimap/cyrus-imapd/pull/3149

On Mon, 17 Aug 2020, at 10:06 PM, Ricardo Signes wrote:
> On our weekly call this morning, we were talking about moving toward 
> standardizing the format of Cyrus logs.  My interest here is in making it 
> easy for a program to read and classify logs.  That's not as simple as it 
> could be, right now, because often a log line is sprintf-'d with parameters.  
> Even worse, sometimes those parameters have spaces in them.
> 
> I think we all agree on something like this:
>  * produce a macro that does the logging in a standard format
>  * the format leads with a "category", which is a fixed string
>  * extra data to be included show up like auditlog does it:  foo=<x> bar=<y>
>  * by using a macro, we can get the location (file, function) from which the 
> log line is being emitted
> 
> Next steps:
>  * agree on the specifics of the above and that it's the way to log in new 
> code
>  * start converting old code (prioritized by value of reading lines from each 
> part of the code)
> 
> Further thoughts before we get on to specifics?
> 
> -- 
> Ricardo Signes (rjbs)

Reply via email to