In serial monitor, is it possible to add timestamp to logfiles?

I know by monitor_filters= time, log2file, you can show timestamp in the terminal and log serial output to a file. However, is it possible to also include the timestamp in the logged file?

Right now I am using CoolTerm to bypass the problem but it will be great if this feature can be included in the Platformio itself!

Please create an issue in Issues · platformio/platformio-core · GitHub for this, the core should allow this.

1 Like

Do you mean I should report this as a bug (because the timestamp should have also been logged into the file), or a new feature request?

I’m not sure – you can open it as either, just describe the problem you have, the developers will sort it out.

@yxuan - have you logged your request at platformio github? I think the feature you described is valuable

It was tracked in add timestamp to logfiles · Issue #4320 · platformio/platformio-core · GitHub.

2 Likes

Yes, however it’s still not working 100% for me because that “garbage from boot-loader” is messing with my output and I don’t know how to fix it. I don’t know if this is within the scope of PlatformIO development or my own hardware specific troubleshooting.

What is your hardware? Could you share your platformio.ini?

The content of my platformio.ini is below:

[env:nano_every]

platform = atmelmegaavr

board = nano_every

framework = arduino

monitor_speed = 38400

lib_deps = bogde/HX711@^0.7.5

monitor_filters = send_on_enter, time, colorize, log2file

monitor_flags =

    --eol

    CRLF

Do you use the latest PlatformIO Core 6.0.3-dev? This option has been removed. Please re-run pio upgrade --dev and use the monitor_eol option.