Envoy and its filters write application logs for debuggability. Envoy can be configured to output application logs in a format that is compatible with common log viewers. This section documents how Envoy can be configured to enable integration with each log viewer.
Stackdriver Logging with GKE¶
--log-format '%L%m%d %T.%e %t envoy] [%t][%n]%v': Logs are formatted in glog format, allowing Stackdriver to parse the log severity and timestamp.
--log-format-escaped: Each string that is logged will be printed in a single line. C-style escape sequences (such as
\n) will be escaped and prevent a single string from spanning multiple lines. This ensures each log line is structured with the glog prefix.
--log-pathflag does not need to be set, since Stackdriver can read logs from STDERR.
--log-levelflag can be set to control the log severity logged to Stackdriver.
Reference documentation for Stackdriver on GKE.