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

re-work the default title line of rendered logs #24

Open
trentm opened this issue Jun 14, 2021 · 1 comment
Open

re-work the default title line of rendered logs #24

trentm opened this issue Jun 14, 2021 · 1 comment

Comments

@trentm
Copy link
Owner

trentm commented Jun 14, 2021

The current title line pattern is roughly:

[@timestamp] LOG.LEVEL (log.logger/service.name on host.hostname): message

I think the parens section is weak. It comes at least partly from my bunyan experience
For comparison:

typical bunyan:  [@timestamp] LEVEL (name/pid on host): message
typical pino:    [@timestamp] LEVEL (pid on host): message
typical winston: [@timestamp] LEVEL: message

Notes:

  • bunyan will always have a name field, which is the equivalent of log.logger in ECS.
  • bunyan and pino will typically have pid (ECS equivalent is process.pid)
  • What about other languages and loggers.
  • service.name will typically only be there with automatic injection from APM agents.
@trentm
Copy link
Owner Author

trentm commented Jun 14, 2021

Bunyan will include "src" fields in the title line, I think.

  • src fields: log.origin.file.* (note that ecs-logging zap logger emits
    "log.origin"."file.name", which adds a surprise)
    • also colorizing these

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant