Merge branch 'feat/monitor_auto_color' into 'master'

feat(tools): Add auto color to monitor and disable colors from chip logs

Closes IDF-362 and DOC-9110

See merge request espressif/esp-idf!33623
This commit is contained in:
Martin Vychodil
2024-10-11 01:04:26 +08:00
7 changed files with 19 additions and 7 deletions

View File

@@ -105,6 +105,7 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
timestamps: bool,
timestamp_format: str,
force_color: bool,
disable_auto_color: bool,
) -> None:
"""
Run esp_idf_monitor to watch build output
@@ -187,6 +188,9 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
if force_color or os.name == 'nt':
monitor_args += ['--force-color']
if disable_auto_color:
monitor_args += ['--disable-auto-color']
idf_py = [PYTHON] + _get_commandline_options(ctx) # commands to re-run idf.py
monitor_args += ['-m', ' '.join("'%s'" % a for a in idf_py)]
hints = not args.no_hints
@@ -1011,6 +1015,11 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
'is_flag': True,
'help': 'Always print ANSI for colors',
},
{
'names': ['--disable-auto-color'],
'is_flag': True,
'help': 'Disable auto coloring logs',
},
],
'order_dependencies': [
'flash',