Skip to content

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

Closed
@gam6itko

Description

@gam6itko

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...

Metadata

Metadata

Assignees

Labels

C-feature-requestCategory: feature requested, but need to be discussed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions