Seldaek / monolog

Sends your logs to files, sockets, inboxes, databases and various web services
https://seldaek.github.io/monolog/
MIT License
21.01k stars 1.9k forks source link

DeduplicationHandler in a read only container #1893

Closed ervinBLU closed 3 months ago

ervinBLU commented 4 months ago

Monolog version 3

Is there a way for DeduplicationHandler to save into database, redis for example, instead of file system? I'm using a read only container and it tries to write on file system, I can't find anything to configure it to use something else instead of file system, Thanks :)

javaDeveloperKid commented 4 months ago

Looking at the source code it's not possible.

Seldaek commented 3 months ago

Nope sorry this is really a hackish handler built to avoid spamming mailboxes when doing mail handler stuff.. But in general IMO it is best to log everything and handle filtering on the log viewer.

Seldaek commented 3 months ago

That said, the DeduplicationHandler accepts a file path, so using stream wrappers you might be able to build a redis backed store for it 🤷🏻 I don't know if it's worth the hassle though.

ervinBLU commented 3 months ago

Thank you for answering :)