Logging Format in ECS

Hi, from our convo in Temporal Slack:

Your correct in that server supports
format: json - this is temporals own zap json schema
or
format: console
in static config

There is no out of box support for ecs format but you can set it up if you build your custom server image, see example here
and look at how code builds ecs logger and then uses it when creating server:

temporal.WithLogger(logger),

If you want tto try out that repo to see ecs format in server logs, set
TEMPORAL_LOG_FORMAT=ecs
for all temporal services in the compose file and follow readme how to build and run locally .

If you cant or dont wanna build custom image then maybe look at reformatting temporal json log format to what you need in es ingest pipeline

Guess rewrite rules like this could work:

{ "rename": { "field": "ts",    "target_field": "@timestamp" } },
{ "rename": { "field": "level", "target_field": "log.level"  } },
{ "rename": { "field": "msg",   "target_field": "message"    } }

For your follow up question if this is somethign that could be added as default in server, yeah you can create a github issue and see what server team says. Hope this helps.