From c81052b70888eb18dca82e33444ebbd9910f5ebc Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Sat, 14 Jan 2023 08:00:53 +0330 Subject: update --- bin/scotch | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'bin/scotch') diff --git a/bin/scotch b/bin/scotch index 9e885cb..638b101 100755 --- a/bin/scotch +++ b/bin/scotch @@ -535,16 +535,18 @@ def main(): lines = lines[:-2] for line in lines: # this is here to support the -i option - if line[0] == "[": + if "-t" in sys.argv or "-tt" in sys.argv or "-ttt" in sys.argv: + timestamp_end_index = line.find(" ") + print(Color.six + line[: timestamp_end_index - 1], end=" ") + line = line[timestamp_end_index + 1 :] + if "-n" in sys.argv: idx = line.find("]") - if idx - 1 < 16: - print(Color.twelve + line[0 : idx + 1], end=" ") - line = line[idx + 2 :] - if line[0] == "[": + print(Color.twelve + line[0 : idx + 1], end=" ") + line = line[idx + 2 :] + if "-i" in sys.argv: idx = line.find("]") - if idx - 1 == 16: - print(Color.thirteen + line[0 : idx + 1], end=" ") - line = line[idx + 2 :] + print(Color.thirteen + line[0 : idx + 1], end=" ") + line = line[idx + 2 :] if line[0 : line.find("(")] in syscall_set: syscall = line[0 : line.find("(")] sysargs = line[line.find("(") + 1 : line.find(")")].split() -- cgit v1.2.3