Skip to content

Instantly share code, notes, and snippets.

@Santiago-j-s
Created April 18, 2018 14:55
Show Gist options
  • Save Santiago-j-s/206bfbf0b77ab62e8c4e96195f1b2db1 to your computer and use it in GitHub Desktop.
Save Santiago-j-s/206bfbf0b77ab62e8c4e96195f1b2db1 to your computer and use it in GitHub Desktop.
{
"yii_log" : {
"title" : "Yii Log",
"description" : "Default Yii Logs.",
"url" : "https://www.yiiframework.com/doc/guide/2.0/en/runtime-logging",
"regex" : {
"basic" : {
"pattern" : "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}) \\[(?<ip>\\d{1,4}\\.\\d{1,4}\\.\\d{1,4}\\.\\d{1,4})\\]\\[-?(?<user>\\d*)\\]\\[-\\]\\[(?<level>\\w*)\\]\\[(?<category>.*)\\](?<body>.*$)"
}
},
"timestamp-format" : [
"%Y-%m-%d %H:%M:%S"
],
"level" : {
"trace" : "trace",
"info" : "info",
"warning" : "warning",
"error" : "error"
},
"value" : {
"body" : { "kind" : "string" },
"ip" : { "kind" : "string", "identifier" : true },
"user" : { "kind" : "integer", "identifier" : true },
"level" : { "kind" : "string", "identifier" : true },
"category" : { "kind" : "string", "identifier" : true }
},
"sample" : [
{
"line" : "2018-04-17 10:58:35 [127.0.0.1][4][-][info][Usuarios\\Login] El usuario asd se ha logueado correctamente."
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment