Closed c-cube closed 7 months ago
What does "optional" mean in more practical terms here? (Unsurprisingly, I use another means of logging… 😛) You could somehow replace Tiny_httpd_log
with Logs
with some kind of compile-time strategy?
Optional means that if you don't have logs installed you can still use tiny httpd :)
And I'd recommend using logs, it's a good library and for once people tend to converge on it!
Okay good. 😃 And yes I did look into it, but in my case a dozen lines did the trick and it did something more tailored to what we need, though I can't remember what. STDIO stuff perhaps.
I can give more details if you're interested, but Logs can easily emit on stdout/stderr, has optional locking, and you can do fun stuff (more advanced) with tags, eg associate a query ID with each log message in a way that can be picked up by the log reporter. It's quite flexible, and the continuation trick means you don't pay that much when a log message would be discarded (eg a debug message when debug isn't enabled).
I can give more details if you're interested, but Logs can easily emit on stdout/stderr, has optional locking, and you can do fun stuff (more advanced) with tags, eg associate a query ID with each log message in a way that can be picked up by the log reporter. It's quite flexible, and the continuation trick means you don't pay that much when a log message would be discarded (eg a debug message when debug isn't enabled).
Logs is a de facto standard and it's too convenient to bypass