danieleteti / loggerpro

An modern and pluggable logging framework for Delphi
Apache License 2.0
353 stars 91 forks source link

Implement a filtering file appender in addition to the default file appender #52

Closed luebbe closed 2 years ago

luebbe commented 2 years ago

As much as I like it that the default file appender separates all tags into different files, I needed just the opposite: A file appender that collects all/selected tags into one file. This is very helpful in order to see interlocked actions from modules with different tags, especially if background threads and user interactions come into the game.

This PR adds TLoggerProFilteringFileAppender which does just this. It filters out the log messages which match the tags passed in the constructor. If the list is empty, all log messages are written into the same file.

danieleteti commented 2 years ago

Thank you for your contribution. Could you adapt your changes to the new code?

danieleteti commented 2 years ago

the changes were really simple. I did it. Please test it in your own environment and give me a feedback. Thanks.

luebbe commented 2 years ago

Will do, thank you very much for accepting the PR

luebbe commented 2 years ago

See #59. Two small regressions and I forgot to adjust the simple file appender example with my last PR 😅

danieleteti commented 2 years ago

Thank you, merged.

DT

Il giorno gio 21 lug 2022 alle ore 09:23 Lübbe Onken < @.***> ha scritto:

See #59 https://github.com/danieleteti/loggerpro/pull/59. Two small regressions and I forgot to adjust the simple file appender example with my last PR 😅

— Reply to this email directly, view it on GitHub https://github.com/danieleteti/loggerpro/pull/52#issuecomment-1191137473, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK4ZJELIISSZUUHJXV6EMLVVD3HJANCNFSM5O6G4JSA . You are receiving this because you modified the open/close state.Message ID: @.***>

-- Daniele Teti CEO & CTO bit Time Professionals website [it]: www.bittimeprofessionals.it website [en]: www.bittimeprofessionals.com blog: www.danieleteti.it ​my last book on leanpub https://leanpub.com/delphimvcframework​ my​ previous​ books on amazon https://www.amazon.it/s?i=stripbooks&rh=p_27%3ADaniele+Teti mobile: +39 3496626822 office: +39 06 20761499