Specifying a monitor log directory

Hi there

I’ve searched for a possibility to alter the output of the serial monitor to another directory (say /logs), wherein lots of logs make noise.

I’ve read the documentations but couldn’t find a way, is there a way to achieve that?
If not, It’d be nice to add it to the IDE.


The log2file filter’s log path is defined as

so it will always log to the <current directory>/platformio-device-monitor-<data>.log file. If you want to log to a different directory, you woudl have to change <current directory> by invoking the PlatformIO monitor / run command from a different folder.

cd /logs
pio run -d <your original project path> -t monitor

For everything else, file an issue in Issues · platformio/platformio-core · GitHub.

1 Like

Thank you @maxgerhardt, I’ve understood how it works.