graphprotocol / block-oracle

MIT License
5 stars 11 forks source link

Include timestamp in log format #243

Open tilacog opened 1 year ago

tilacog commented 1 year ago

Our logs don't include a timestamp in the log lines, we should add them.

jainamshah102 commented 11 months ago

I am interested to work on this issue. Can you provide some guidance and assistance in resolving this.

tilacog commented 11 months ago

Thanks, @jainamshah102!

We set up our logging here: https://github.com/graphprotocol/block-oracle/blob/4968d572a03a857ebdad07efef08a2ee79e97b85/crates/oracle/src/runner/diagnostics.rs#L9-L25

We use the tracing-subscriber crate for that purpose.

It would be ideal to adjust the stdout layer to include an ISO-8501 timestamp prefixing the log message.

jainamshah102 commented 11 months ago

@tilacog Can I pick up this issue? Can you please add me in assignees?