Use RFC3339Nano timestamp format for JSON logs

What does this MR do?

Configure the JSON log formatter to use RFC3339Nano format (2006-01-02T15:04:05.999999999Z07:00) instead of the default RFC3339 format. This provides nanosecond precision in log timestamps which is useful for:

  • Precise ordering of events that occur in rapid succession
  • Correlation with other high-precision logging systems
  • Debugging performance-critical operations
  • Maintaining precision when logs are aggregated from multiple sources

The change also updates formatter initialization to use explicit struct literals instead of new() for consistency.

Why was this MR needed?

Precise ordering of timestamps.

What's the best way to test this MR?

I tested it locally with --log-format json.

Before vs after:

{"level":"warning","msg":"...","time":"2025-10-14T19:13:39+02:00"}
{"level":"warning","msg":"...","time":"2025-10-14T19:13:56.263886+02:00"}

What are the relevant issue numbers?

Merge request reports

Loading