Unrotate logs and extract information starting from a row with predefined string.
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")
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_string
are copied totarget_filename
- Required:
True
- Type:
String
- Default:
None
- Required:
target_filename
- Filename for output log- Required:
True
- Type:
String
- Default:
None
- Required:
Provides no output