GcpLayout.json described by Google Cloud Platform structured logging with additional _thread, _logger and _exception fields. The exception trace, if any, is written to the _exception field as well as the message field – the former is useful for explicitly searching/analyzing structured exception information, while the latter is Google’s expected place for the exception, and integrates with Google Error Reporting.
it would be great if this was somewhat compatible a sample message from log4j2 in GcpLayout:
It would be great to have a GCP format https://cloud.google.com/logging/docs/structured-logging Log4j2 has some support the mappings are documented: https://logging.apache.org/log4j/2.x/manual/json-template-layout.html sepecifically they say:
GcpLayout.json described by Google Cloud Platform structured logging with additional _thread, _logger and _exception fields. The exception trace, if any, is written to the _exception field as well as the message field – the former is useful for explicitly searching/analyzing structured exception information, while the latter is Google’s expected place for the exception, and integrates with Google Error Reporting.
it would be great if this was somewhat compatible a sample message from log4j2 in GcpLayout: