XF 2.3 Addon Logging Solution

Hmm, not sure if I like the idea that every consumer should have its own setting to control logging severity.

Sure, this allows a lot flexibility - but it also complicates logging:
Instaf of just calling Logger::... whenever there is something to log, the consumer whould have to check its log level setting before making the call.
So this would either mean a lot of if everywhere or a custom wrapper to check the setting before calling your code.

Doesn't this somewaht defeat the purpose of easy to use, centralized logging?

I therefore think it might be better to have a log level setting within your code that controls the max. level that will be logged (capped to Info if debug mode is not enabled).
A minimum log level makes a lot more sense. I might have misunderstood their original suggestion, but I believe they were talking about setting up a permission to view sensitive logs and defining which log types are considered “sensitive” in the options.

I’m not sure there’s a practical way to implement that, though.

I’ll get started on adding the minimum log level once I’ve finished with the filtering options for the log tables.
 
Back
Top Bottom