Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log2file - Store log files in user specific folder #4596

Closed
1 task
JeroenIoT opened this issue Apr 12, 2023 · 2 comments
Closed
1 task

Log2file - Store log files in user specific folder #4596

JeroenIoT opened this issue Apr 12, 2023 · 2 comments

Comments

@JeroenIoT
Copy link

Hello,

I am the feature log2file in platformio. This is a very useful feature which I do use a lot.

  • Feature Request.

  • The problem I am facing is that the number of log files pile up in my project's root folder.
    Often there are too many and I have to move the log files to another folder.

  • My request is that there is another variable in platformio.ini which allows me to specify the folder (within the project folder) in which the logs files are stored.
    For example:

    Platformio.ini:
       monitor_filters = default, time, log2file ; 
       monitor_log_dir = logs;  (new / not exisiting at this moment)
    
    So the new variable "monitor_log_dir = logs" would place the logs in 
    C:\Users\username\Documents\PlatformIO\Projects\project_root\logs\
    
  • If the folder does not exist it should be created.

Hope this is clear and feedback is welcome. Also discussed this topic here

@ivankravets
Copy link
Member

Thanks for the report. PlatformIO will use the libs folder for saving monitor logs.

Please re-test with pio upgrade --dev.

@JeroenIoT
Copy link
Author

JeroenIoT commented Apr 13, 2023

  • Upgraded to PlatformIO Core, version 6.1.7a4
  • Tested:
  • Compiled with no changes to platformio.ini
    monitor_filters = default, time, log2file ; adds time tracking to the TERMINAL and enables logging
  • Log files are stored in project folder in folder logs (not in libs as you wrote above)
  • Example:
    C:\Users\username\Documents\PlatformIO\Projects\pioProjectName\logs
  • In case logs folder does not exists it is automatically generated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants