mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-04 02:50:58 +02:00
tools: Some additions to IDF Monitor's timestamps
Additions to https://github.com/espressif/esp-idf/pull/7021
This commit is contained in:
@@ -71,7 +71,7 @@ def action_extensions(base_actions, project_path):
|
||||
|
||||
return result
|
||||
|
||||
def monitor(action, ctx, args, print_filter, monitor_baud, encrypted):
|
||||
def monitor(action, ctx, args, print_filter, monitor_baud, encrypted, timestamps, timestamp_format):
|
||||
"""
|
||||
Run idf_monitor.py to watch build output
|
||||
"""
|
||||
@@ -118,6 +118,12 @@ def action_extensions(base_actions, project_path):
|
||||
if encrypted:
|
||||
monitor_args += ['--encrypted']
|
||||
|
||||
if timestamps:
|
||||
monitor_args += ['--timestamps']
|
||||
|
||||
if timestamp_format:
|
||||
monitor_args += ['--timestamp-format', timestamp_format]
|
||||
|
||||
idf_py = [PYTHON] + _get_commandline_options(ctx) # commands to re-run idf.py
|
||||
monitor_args += ['-m', ' '.join("'%s'" % a for a in idf_py)]
|
||||
|
||||
@@ -214,7 +220,17 @@ def action_extensions(base_actions, project_path):
|
||||
'IDF Monitor will invoke encrypted-flash and encrypted-app-flash targets '
|
||||
'if this option is set. This option is set by default if IDF Monitor was invoked '
|
||||
'together with encrypted-flash or encrypted-app-flash target.'),
|
||||
}, {
|
||||
'names': ['--timestamps'],
|
||||
'is_flag': True,
|
||||
'help': 'Print a time stamp in the beginning of each line.',
|
||||
}, {
|
||||
'names': ['--timestamp-format'],
|
||||
'help': ('Set the formatting of timestamps compatible with strftime(). '
|
||||
'For example, "%Y-%m-%d %H:%M:%S".'),
|
||||
'default': None
|
||||
}
|
||||
|
||||
],
|
||||
'order_dependencies': [
|
||||
'flash',
|
||||
|
Reference in New Issue
Block a user