We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If we pass key "logger" in context then RR display invalid JSON log with two "logger" keys.
# .rr.yaml logs: mode: production level: debug encoding: json
https://github.com/roadrunner-php/app-logger/blob/6be59995a76f03b791702ddbe2b47df48bb16e51/src/Logger.php#L99
We have 4 reserved keys
In this case we have 2 solution:
__
\RoadRunner\Logger\Logger::log("Hello!", [ 'logger'=> 'foo', 'ts' => 'foo', 'msg' =>'foo', 'level' => 'foo' ])
Output
{ "level": "info", "ts": 1740209343338036353, "logger": "app", "msg": "Hello!", "__level": "foo", "__ts": "foo", "__logger": "foo", "__msg": "foo" }
But it's will be good feature. Because we can pass to logger out php monolog logger channel name for further usage in tools like grafana/loki.
https://spiral.dev/docs/basics-logging/current#send-logs-to-a-specific-channel
2025.3.2
The text was updated successfully, but these errors were encountered:
Hey @gam6itko 👋🏻 Why not vise-versa? Why not use __logger for your custom output like this:
__logger
\RoadRunner\Logger\Logger::log("Hello!", [ '__logger'=> 'foo', '__ts' => 'foo', '__msg' =>'foo', '__level' => 'foo' ])
Sorry, something went wrong.
rustatian
No branches or pull requests
No duplicates 🥲.
What happened?
If we pass key "logger" in context then RR display invalid JSON log with two "logger" keys.
https://github.com/roadrunner-php/app-logger/blob/6be59995a76f03b791702ddbe2b47df48bb16e51/src/Logger.php#L99
We have 4 reserved keys
In this case we have 2 solution:
__
.Output
I think it is very dangerous because user can pass key "logger" with values ["server", "jobs", "http"].
But it's will be good feature. Because we can pass to logger out php monolog logger channel name for further usage in tools like grafana/loki.
https://spiral.dev/docs/basics-logging/current#send-logs-to-a-specific-channel
Version (rr --version)
2025.3.2
How to reproduce the issue?
The text was updated successfully, but these errors were encountered: