etr / libhttpserver

C++ library for creating an embedded Rest HTTP server (and more)
GNU Lesser General Public License v2.1
882 stars 184 forks source link

Make `httpserver::error_log` consume and apply `va_list`. #298

Closed bcsgh closed 1 year ago

bcsgh commented 1 year ago

Identify the Bug

https://github.com/etr/libhttpserver/issues/297

Description of the Change

This makes it generate full log messages.

There are a small number of places where error_log is called where it is expected to apply printf style formatting to it's extra arguments. In most of them, the extra arguments are the most important.

Alternate Designs

None.

Possible Drawbacks

None?

Verification Process

Building with this commit allowed me to fix the issue I was having using the library.

Release Notes

Make httpserver::create_webserver::log_error callback get fully formatted messages.

etr commented 1 year ago

Thanks for this as well; it is going to help a lot in streamlining the logging for quite a lot of folks.