Seldaek / monolog

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

Pass maxNormalizeDepth and maxNormalizeItemCount in NormalizerFormatter #1845

Closed BafS closed 10 months ago

BafS commented 11 months ago

The current way to change maxNormalizeDepth and maxNormalizeItemCount is to extends the NormalizerFormatter.

We should instead be able to change them using the constructor (and in the future those fields should be private IMO).

stof commented 10 months ago

The actual current way to customize them is to call the setters.

BafS commented 10 months ago

But why is $dateFormat passed in the constructor and not the other "settable" arguments? It seems inconsistent

Seldaek commented 10 months ago

Yeah some edge case features are only available via setters to keep the constructors a bit leaner.