Search code examples
logstashlogbacksimpledateformat

How to format date as real UTC or Unix style in logback logstash encoder?


The timestamp provided by logstash encoder in logback is not in real UTC format even if I specify UTC timezone (instead of Z there's +00:00 at the end of the timestamp)


Solution

  • I found that logstash composite encoder is a solution with timestamp provider containing timeZone as UTC and dateFormat as yyyyMMdd'T'hh:mm:ss.SSS'Z'