Application helps analyze logs. It is also a good example how QAbstractTableModel
- Create configuration file, which contains
startEntryRegExp
- regular expression for detecting line containing timestamptimeFormat
- format use to convert string to date-timetimeCaptureIndex
- capture index of regular expressionstartEntryRegExp
which will provide date-timetagCaptureIndex
- capture index of tag columnlogTextCaptureIndex
- 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
}
- Load it to application
- Load logs which suppose to be analyzed
- Select time zone of logs to show time in local time
- Provide filter pattern: literal or regular expression