Skip to content

Latest commit

 

History

History
24 lines (23 loc) · 1.1 KB

README.md

File metadata and controls

24 lines (23 loc) · 1.1 KB

LogsFilter

Application helps analyze logs. It is also a good example how QAbstractTableModel

Use

  1. Create configuration file, which contains
  • startEntryRegExp - regular expression for detecting line containing timestamp
  • timeFormat - format use to convert string to date-time
  • timeCaptureIndex - capture index of regular expression startEntryRegExp which will provide date-time
  • tagCaptureIndex - capture index of tag column
  • logTextCaptureIndex - capture index of content of logs entry
{
    "startEntryRegExp"    : "(\\d+-\\d+-\\d+ \\d+:\\d{2}:\\d{2}.\\d{3}) \\[(\\w+)\\]\\s*(.*)",
    "timeFormat"          : "yyyy-MM-dd HH:mm:ss.zzz",
    "timeCaptureIndex"    : 1,
    "tagCaptureIndex"     : 2,
    "logTextCaptureIndex" : 3
}
  1. Load it to application
  2. Load logs which suppose to be analyzed
  3. Select time zone of logs to show time in local time
  4. Provide filter pattern: literal or regular expression