Microgateway log timestamp

Hi there, I have an issue with micro gateway where the behaviour and the documentation don't seem to match. I would like to offload micro gateway logs to a log aggregator but the MG log entries do not have a timestamp. The documentation here indicates that a timestamp is available by default but I am not seeing that - my sample log output below.

info e49de770-b715-11e8-8af1-5df6607ef810 edge micro listening on port 8000 uid=e49de770-b715-11e8-8af1-5df6607ef810, port=8000

info sourceRequest m=GET, u=/ext/v2/auth, h=localhost:8000, r=::1:56072, i=f021e6f0-b715-11e8-b097-f16245a07323

info targetRequest m=GET, u=/v2/auth, h=api.<some org>.co.nz:NaN, i=f021e6f0-b715-11e8-b097-f16245a07323

info targetResponse s=400, d=780, i=f021e6f0-b715-11e8-b097-f16245a07323

info sourceResponse s=400, d=786, i=f021e6f0-b715-11e8-b097-f16245a07323

Has anyone else experienced this?

Cheers.

***UPDATE***

It seems that this issue only exists with console logging. If the configuration property to_console is set to true the timestamp is not recorded - if unset the log will be written to file and the timestamp is captured.

0 3 168
3 REPLIES 3

I found this as well.

https://github.com/apigee/microgateway-core/blob/581b7e73b5759f7410f4b1294ebb4ea06e571e0b/lib/loggin...

any recommended workarounds for adding a timestamp to the console output? We're capturing stdout so having timestamps is rather important.

Any suggestions from the community (other than forking which would rather avoid) ?

Former Community Member
Not applicable

We will add this as part of 2.5.27. We are looking to release that by early next week.

thanks! I'll look for it.