Skip to content

Instantly share code, notes, and snippets.

@fquinto
Created May 22, 2018 09:24
Show Gist options
  • Save fquinto/e137ce236297804a55a1e4d783373316 to your computer and use it in GitHub Desktop.
Save fquinto/e137ce236297804a55a1e4d783373316 to your computer and use it in GitHub Desktop.
Laravel Python format for lnav
{
"pythonlogger": {
"title": "Python logger format",
"description": "Log format used by python logger class",
"url": "",
"regex": {
"main" : {
"pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2})\\] python\\.(?<level>\\w+): (?<module>\\w+)\\.py (?<body>.*)$"
}
},
"timestamp-format": ["%Y-%m-%d %H:%M:%S"],
"level-field": "level",
"level": {
"critical": "CRITICAL",
"error": "ERROR",
"warning": "WARNING",
"info": "INFO",
"debug": "DEBUG"
},
"value": {
"level": { "kind" : "string", "identifier" : true },
"module": { "kind" : "string", "identifier" : true },
"body": { "kind" : "string" }
},
"sample": [
{
"line": "[2018-05-22 10:48:30] python.WARNING: superscript.py MainProcess run Fails on connection"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment