Skip to content
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

[💡 FEATURE REQUEST]: Ability to customize "logger" key value #2136

Open
gam6itko opened this issue Feb 22, 2025 · 2 comments
Open

[💡 FEATURE REQUEST]: Ability to customize "logger" key value #2136

gam6itko opened this issue Feb 22, 2025 · 2 comments
Assignees
Labels
C-feature-request Category: feature requested, but need to be discussed

Comments

@gam6itko
Copy link
Contributor

gam6itko commented Feb 22, 2025

Plugin

Logger

I have an idea!

I want to scrape logs from roadrunner app with grafana/promtail.
For this reason I use roadrunner-bridge/app-logger to send all logs in RR and display it in console.

In Spiral Framework we have channels in logger for information filtering.

At the moment we don't have the ability to specify a channel when sending logs to roadrunner.
All logs from "app" displays with {"logger":"app"}

It would be very useful to specify a channel for logs sent to RR

\RoadRunner\Logger\Logger::log("channel-name", "Hello!", [
    'foo'=> 'foo', 
])

Log

{
  "level": "info",
  "ts": 1740209343338036353,
  "logger": "app-channel-name",
  "msg": "Hello!",
  "foo": "foo"
}

With prefix app- there is no be conflict if user send channel name like "http", "server", etc...

@gam6itko gam6itko added the C-feature-request Category: feature requested, but need to be discussed label Feb 22, 2025
@rustatian
Copy link
Member

Hey @gam6itko 👋🏻
Why not use AppLogger's log method to log without any RR decoration? docs

@gam6itko
Copy link
Contributor Author

Hey @gam6itko 👋🏻 Why not use AppLogger's log method to log without any RR decoration? docs

Ok, I will try this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: feature requested, but need to be discussed
Projects
None yet
Development

No branches or pull requests

2 participants