extract_log
October 31, 2022 ยท View on GitHub
Overview
Unrotate logs and extract information starting from a row with predefined string.
Examples
def test_fun(duthosts, rand_one_dut_hostname):
duthost = duthosts[rand_one_dut_hostname]
im_facts = duthost.image_facts(directory="/tmp/logs/", file_prefix="log_", start_string="start log", target_filename="/tmp/final_logs/final_log.log")
Arguments
directory- Name of directory with target log files- Required:
True - Type:
String - Default:
None
- Required:
file_prefix- Prefix that target log file names should start with- Required:
True - Type:
String - Default:
None
- Required:
start_string- After log files are combined all lines afterstart_stringare copied totarget_filename- Required:
True - Type:
String - Default:
None
- Required:
target_filename- Filename for output log- Required:
True - Type:
String - Default:
None
- Required:
Expected Output
Provides no output