Open lordofhyphens opened 7 years ago
Boost::log works very well for the Prusa3D fork. It helps with debugging and profiling.
I had done a one-off when I was working on the conditional gcode feature, couldn't get it to compile in the bit I was messing with it. :/
When I find some time I will probably mess with it more. Boost::log was certainly convenient as we are already using other things in Boost.
When I tried it again, it decided to work. :/
Something I do definitely want is ability to control the logging output at runtime. Probably with a singleton Slic3r::Log instance, although that would be just there to provide a way to change/set the logging sink configuration (at least the level) at runtime.
I believe the logging in the prusa fork is controlled with an env value SLIC3R_LOGLEVEL. The C++ interface is published into perl, so the logging behavior is unified.
On Oct 24, 2017 6:02 AM, "Joseph Lenox" notifications@github.com wrote:
When I tried it again, it decided to work. :/
Something I do definitely want is ability to control the logging output at runtime. Probably with a singleton Slic3r::Log instance, although that would be just there to provide a way to change/set the logging sink configuration (at least the level) at runtime.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alexrj/Slic3r/issues/4160#issuecomment-338866798, or mute the thread https://github.com/notifications/unsubscribe-auth/AFj5I2sxBi2a_7O5Ql2rKvKrCsRVLTUQks5svWFogaJpZM4QAFl6 .
Currently, all of the libslic3r debugging messages are gated behind an
#ifdef
and consist of simple printf statements.It would be very convenient to incorporate a more functional logging library system, preferably with some ability to (at runtime) enable/disable different output streams. Something that acts like iostreams would be a big plus (ease of use) and the ability to redirect to files.
Boost.Log does look promising.
While I would be fine with a libslic3r package/class that customizes the logging or provides easier access to the log (or determining what is logged), I do not want someone to reinvent the logging system wheel yet again for Slic3r.
Tasks
#ifdef
with calls out to log.