Environment-specific logger channels
We need a way to define environment-specific logger channels.
My idea was to add an environments array to all channels, an add getEnvironments(): ?array on the interface.
return new LoggerConfig(
channels: [
new DailyLogChannel(
path: 'path/to/log',
environments: [Environment::PRODUCTION],
),
new AppendLogChannel(
path: 'path/to/log',
environments: [Environment::DEV],
),
],
)
@przemyslaw-przylucki what do you think?
@brendt sorry - I was on a rather long business trip :/
I kinda like this approach but I feel like we could benefit more with env-specific config support like logger.production.php as we'll need more and more of that exentisivility.
Another cool thing would be to make initializers work like that too - it creates a bit more magic but also creates standards for how things are done. Not sure if I love it or not but it's an idea
I kinda like this approach but I feel like we could benefit more with env-specific config support like logger.production.php as we'll need more and more of that exentisivility.
Oh I think I like that! Let's have a discussion about it on discord as well