Skip to content

Instantly share code, notes, and snippets.

@code-poel
Last active April 27, 2024 11:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save code-poel/e19dcab8ce69bc9806a3 to your computer and use it in GitHub Desktop.
Save code-poel/e19dcab8ce69bc9806a3 to your computer and use it in GitHub Desktop.
lnav Magento 1 Log Format
#! /usr/bin/env lnav -i
{
"magento_log" : {
"title" : "Magento Log Format",
"description" : "Log format used in Magento 1.",
"url" : "https://gist.github.com/chrisvanderpoel/e19dcab8ce69bc9806a3",
"regex" : {
"basic" : {
"pattern" : "^(?<timestamp>[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}\\T[0-9]{2}\\:[0-9]{2}\\:[0-9]{2}\\+[0-9]{2}\\:[0-9]{2})\\s(?<level>\\w+)\\s(?<component>\\(\\w+\\))\\:\\s(?<body>.*)$"
}
},
"level-field" : "level",
"level" : {
"debug" : "DEBUG",
"error" : "ERROR",
"warning" : "WARNING"
},
"value" : {
"component" : {
"kind" : "string",
"identifier" : true
}
},
"sample" : [
{
"line" : "2015-12-16T15:01:01+00:00 DEBUG (7): This is an example log message from Magento!"
}
]
}
}
@timbroder
Copy link

@chrisvanderpoel did you find this somewhere or make it? Looking for one for laravel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment