ezzieyguywuf wrote: ↑Wed Sep 04, 2019 8:47 pm
wmayer wrote: ↑Wed Sep 04, 2019 8:27 pm
Looks quite nice and elegant.
well then, I will begin work on a PR that incorporates these concepts.
So as an update - as I work on this PR, I find that I'm re-writing more and more of the Console.h code base. In general, it seems like we're "reinventing the wheel" a bit here. For example,
spdlog appears to be a mature, open-source logging library written in C++.
Would I be better off finding a way to incorporate spdlog (or something similar) into the FreeCAD codebase, rather than "reinventing the wheel"?
In general, I'm an advocate of the Unix philosophy - in other words, each program should do one thing, and do it well. While I understand that this is difficult to do on a project as ambitious as FreeCAD, it should still be feasible to at least approach this sort of ideal.
If for whatever reason there is an issue with pulling in spdlog, then maybe it'd even be better to update/replace the Console.h stuff (specifically I'm looking at ConsoleObserver and ConsoleSingleton) with some sort of wrapper around
python's logging module.
I have personal experience using python's logging module, and I can attest that it is simple, powerful, and gets the job done.