-
-
Notifications
You must be signed in to change notification settings - Fork 137
feat(log)!: support multiple loggers #1595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
tempest/debug from tempest/logtempest/debug from tempest/log
9a1bb51 to
0757d78
Compare
tempest/debug from tempest/logtempest/debug from tempest/log
67d17c2 to
55e95fd
Compare
|
Looks clean! How will we handle the breaking change? Is there a way we can keep the old way for now but deprecate it? Just so that we can have this in 2.x already and don't have to wait until 3.x |
|
There would be naming conflicts with the new To be honest, the breaking change is minor: if users have a custom logging config, it will be ignored in favor of the default one EDIT: actually, it won't be ignored, it will crash because they'd be instantiating an interface |
|
I'm fine merging it in; but we should provide a rector for it then. Are you up for that? Otherwise I'll take care of it |
tempest/debug from tempest/log|
I updated the PR to bring some other improvements, notably tagged configurations, in order to have the ability to have multiple loggers for different purposes, which is actually quite important! I also added docs to the PR, so it's ready to be merged. @brendt, I tried making a Rector rule for the breaking change, but couldn't manage, so if you still want to, you can do it 😓 |
This pull request dissociates
tempest/debugfromtempest/log, among other improvements..tempest/logsinstead of./logtailcommand and thetail:projectone have been removed, there's justtail:debugandtail:logsnowThis is still a draft because I feel like there could be better APIs for the config, but not sure what exactly. The issue right now is that if you don't know about the existing channel classes, you have to look up the docs, because the channels property is an array.Maybe I'm overthinking and it's fine as-is? Currently, it looks like that:EDIT: ended up using the same pattern as everywhere in Tempest—dedicated config files, with one config allowing for multiple channels.
Due to this change, this PR unfortunately becomes breaking.
As a reminder, to log differently in different environment, we can have
logging.<env>.config.phpfiles.TODO: