I have a log file and I want to write a python script to parse out information from that log to another .txt file. I get stuck on how to start because I am very new to python. Could anyone shred some light on how I should do it
My log file contain:
06 May 19 03:40:35 3 abCodeClearTrap Error Clear Trap (agent: 12367a12, chassis:12367a12, ErrIdText: ERROR ID TEXT, csssi: EXTIFG, clearedID: 0x089088394)
06 May 19 03:44:35 3 abCodeErrorTrap Error Trap (agent: 12368a15, chassis: 12368a15, ErrIdText: Skip this item, csssi: SSRSSR, clearedID: 0x089088394)
Say the user want to parse the date, time, agent, Clear, and ErrIDText. How would I go about doing that. Thanks in advance
remodule. A simpler solution that would easily mess up or break would be to.split()the strings and then refer to items by their index.