Skip to content

Log format: allow logging without source, or shortened source #10688

@howardjohn

Description

@howardjohn

Title: Log format: allow logging without source, or shortened source

Description:
Currently our logs look like [bazel-out/k8-opt/bin/external/envoy/source/common/config/_virtual_includes/grpc_stream_lib/common/config/grpc_stream.h:92] some log. Due to covid-19 WFH my monitor is really tiny so now the source part grpc_stream.h:92 takes up the entire screen.

It would be nice if there was some way to make this shorter. I looked over https://www.envoyproxy.io/docs/envoy/latest/operations/cli#cmdoption-log-format but did not see any, just %v which includes both the message and the source.

Just the tail part of the source might be a useful compromise as well (eg [grpc_stream.h:92] some log. If we wanted maximum flexibility, it seems like we could have

  • %v full source + message
  • %something full source
  • %something trimmed source
  • %something just the message

I am not sure that level is actually needed though

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions