ViliusS commented on code in PR #3586: URL: https://github.com/apache/logging-log4j2/pull/3586#discussion_r2024880644
########## log4j-layout-template-json/src/main/resources/GcpLayout.json: ########## @@ -1,13 +1,18 @@ { - "timestamp": { + "timestampSeconds": { "$resolver": "timestamp", - "pattern": { - "format": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", - "timeZone": "UTC", - "locale": "en_US" + "epoch": { + "unit": "secs", + "rounded": true } }, - "severity": { + "timestampNanos": { + "$resolver": "timestamp", + "epoch": { + "unit": "secs.nanos" + } + }, Review Comment: I specifically chosen to use `{"timestampSecond", "timestampNanos"}` format because: a) It is common for all three Google application: Spring GCP libraries, Ops Agent, Legacy Logging Agent. b) Google Ops Agent JSON processor is recursive, so if you have more than one level in JSON it is impossible to operate on that field later in Ops Agent pipeline and match correctly to the timestamp field. See https://github.com/GoogleCloudPlatform/ops-agent/issues/1920#issuecomment-2769268587. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org