Skip to content

Log2file - Store log files in user specific folder #4596

Closed

Description

@JeroenIoT

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

Activity

  1. added this to the 6.1.7 milestone on Apr 12, 2023
  2. ivankravets commented on Apr 12, 2023

    @ivankravets
    Member

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

    Please re-test with pio upgrade --dev.

  3. JeroenIoT commented on Apr 13, 2023

    @JeroenIoT
    Author
    • 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
  4. added a commit that references this issue on May 28, 2024
    5c3ae15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions