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

File Save direct from the command line [feature request] (IDFGH-12786) #14

Open
filzek opened this issue May 8, 2024 · 1 comment
Open
Assignees

Comments

@filzek
Copy link

filzek commented May 8, 2024

To enhance the usability and functionality of the idf.py monitor command, it would be beneficial to introduce a new option, --file, that facilitates simultaneous output to both the terminal and a specified log file. This feature is particularly useful for developers who need to analyze logs after running their application or during debugging sessions.

Proposed Feature Description
Option: --file FILENAME
Functionality: When the --file option is used with the idf.py monitor command, the tool should simultaneously display the output in the terminal and write it to the specified file. This dual-output approach allows developers to monitor their application in real-time while also maintaining a record for later analysis.

Example Usage:

idf.py -p PORT monitor --file xpto.txt

In this scenario:

-p PORT specifies the serial port where the ESP device is connected.
--file xpto.txt directs the idf.py monitor tool to write the output to xpto.txt while also displaying it in the terminal.
Benefits
Convenience: Developers can track issues in real-time and have a persistent record without needing to redirect or pipe output manually.
Efficiency: This feature saves time and reduces the complexity of development workflows, especially when diagnosing intermittent issues that require reviewing extended logs.
Consistency: Having a standardized way to log monitor output ensures that developers can reliably capture and share logs across different systems and teams.

This way the CRTL + L could also be used, but the log can be done form the prompt call.

@github-actions github-actions bot changed the title File Save direct from the command line [feature request] File Save direct from the command line [feature request] (IDFGH-12786) May 8, 2024
@pcouderc12
Copy link

+1
and file name not mandatory, a default fixed like name lastlog.txt is enough...

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

4 participants