loggerpro icon indicating copy to clipboard operation
loggerpro copied to clipboard

Disabling logging.

Open seer-true opened this issue 8 months ago • 4 comments

I can't figure out how to provide for the possibility of fully or partially disabling logging. Initially, the log is written to a file. At some point, I no longer need logging, for example. with the [Info] tag. I can't surround all Log.Info calls with the If operator.

seer-true avatar Mar 10 '25 13:03 seer-true

There is a filtering log provider, which you can wrap from the file logger. The filtering log provider has an anonymous callback for filtering the log messages. Thus you can insert your own method there, which would allow you to filter log messages any way you like and turn the criteria on/off at run time.

luebbe avatar Mar 10 '25 15:03 luebbe

"The filtering log provider has an anonymous callback for filtering the log messages." I don't understand/find what this method is?

seer-true avatar Mar 20 '25 11:03 seer-true

LoggerPro.proxy.pas -> TLoggerProAppenderFilterImpl

luebbe avatar Mar 20 '25 14:03 luebbe

Image

danieleteti avatar Mar 20 '25 15:03 danieleteti