novelrt / NovelRT

A cross-platform 2D game engine accompanied by a strong toolset for visual novels.
MIT License
184 stars 42 forks source link

Logging Service does not allow for setting log level on a global level #476

Open capnkenny opened 2 years ago

capnkenny commented 2 years ago

Basically, even when setting the logging info on a new logging service instance, it only sets the logging level of the logger that is created. Therefore, you can't effectively disable debug logs on a debug build - it'll only disable (atm) if you build the engine in Release configuration.

Repro Steps: 1) Build NovelRT in Debug 2) Build InputEcsSamples in Debug 3) Launch InputEcsSamples (Review Console Output) 4) Build NovelRT and InputEcsSamples in Release 5) Re-run InputEcsSamples (Review Console Output again)

I would expect that even in Debug mode, the logging would respect the setting defined in the application's main.cpp (or wherever the setLogLevel function is being called.