mtg icon indicating copy to clipboard operation
mtg copied to clipboard

[feature request] allow configuring the time format on the log of mtg

Open IceCodeNew opened this issue 2 years ago • 1 comments

mtg only outputs logs in a format like below, it is not quite human-readable. I am wondering if we could make a plan on supporting configuring the time format of the log.

{"level":"info","client-ip":"REDACTED","stream-id":"REDACTED","logger":"proxy","timestamp":1673594851101,"message":"Stream has been started"}

IceCodeNew avatar Jan 13 '23 07:01 IceCodeNew

Hi!

Sorry for the late reply: I have very busy time now.

It is kinda possible but actually violates what I've tried to achieve. mtg produces structured logs https://www.loggly.com/use-cases/what-is-structured-logging-and-how-to-use-it/ so it has to be mainly consumed by some other means. Timestamp here is UNIX time. I'm afraid I can't change this field without violating backward compatibility. What I can do is to introduce a new field, like "iso-datetime" that will have ISO8601 or RFCXXX (do not recall a number).

Unfortunately, I do not have a time for doing that now. I'll probably take a sprint at the end of march/april to complete all pending mtg-related tasks so will consider it as a feature to have.

Thanks :)

9seconds avatar Mar 09 '23 04:03 9seconds