You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust GcpLayout JSON to latest format (apache#3586)
* Adjust GcpLayout JSON to latest format
First, it formats the log timestamp field to the correct format
recognized by Fluent-Bit (component of Google Cloud Logging) and Google
Ops Agent.
Secondly, severity field now must be prefixed with
logging.googleapis.com.
Third, counter cannot be used for insertId as it is duplicated on
different threads.
And the last but not the least, exception, thread and logger fields are
pretty standard when logging via Logback's JSON layout and Google's
Spring GCP libraries. Field name changes now match these other loggers.
* revert severity changes, remove insertId
* Remove insertid from tests
* fix spotless error
* Switch exception field to use exception resolver
* try to fix timestamp tests
* Fix tests with empty exceptions
* Add changelog
* Improve changelog.
---------
Co-authored-by: Volkan Yazıcı <[email protected]>
Copy file name to clipboardExpand all lines: log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/GcpLayoutTest.java
Update `GcpLayout.json` JSON Template Layout event template to support automatic timestamp recognition by the Google Cloud Logging. This also changes `exception`, `thread`, `logger` fields, and removes `insertId` field.
0 commit comments