blikblum/multilog

Logger class should not be created in initialization of Multilog unit

Closed this issue · 2 comments

Logger should not be instantiated automatically in MultiLog unit. Old behaviour was better since it had instantiation decoupled into SharedLogger unit. The way it is now, if I want to enhance TLogger class I can do it creating my own descedant but runtime memory is wasted in MultiLog initialization section where Logger that I will never use will be instantiated anyway.

This change was done to align with other libraries like CodeSite and SmartInspect. It makes easier to log, e.g., separated packages.

The perf impact is minimal and is worth the easy of use

It would help to allow to configure what TLogger class is instantiated?

I was afraid that ease of use would be the reason for such a change, but ease of use was also available with old SharedLogger unit. Ok, I will have to live with that and patch my local files every time.