Skip to content

Instantly share code, notes, and snippets.

@nexces
Created November 28, 2016 12:45
Show Gist options
  • Save nexces/e479762473f39b6acb856f996d8be330 to your computer and use it in GitHub Desktop.
Save nexces/e479762473f39b6acb856f996d8be330 to your computer and use it in GitHub Desktop.
{
"apache_error_log": {
"title" : "Common Error Log",
"description" : "The default web error log format for servers like Apache.",
"regex" : {
"apache" : {
"pattern" : "^\\[(?<timestamp>[^\\]]+)\\] \\[(?<level>\\w*:?\\w+)\\] \\[client (?<client>[^\\]]+)] (?<body>.*)"
},
"apache2" : {
"pattern" : "^\\[(?<timestamp>[^\\]]+)\\] \\[(?<level>\\w*:?\\w+)\\] \\[pid (?<pid>[^\\]]+)] \\[client (?<client>[^\\]]+)] (?<body>.*)"
}
},
"timestamp-format": [
"%a %b %d %H:%M:%S.%L%L %Y",
"%a %b %d %H:%M:%S.%L %Y",
"%a %b %d %H:%M:%S %Y"
],
"level-field": "level",
"level" : {
"fatal": "emerg|alert",
"critical": "crit",
"error" : "error",
"warning" : "warn",
"stats": "no such level in apache",
"info" : "info|notice",
"debug": "debug",
"trace": "trace[1-8]"
},
"value": {
"level": {
"kind": "string",
"identifier": true
},
"pid": {
"kind": "integer",
"identifier": true
},
"client": {
"kind": "string",
"identifier": true,
"collate" : "ipaddress"
}
},
"sample" : [
{
"line" : "[Wed Nov 23 17:05:46 2016] [error] [client 46.29.16.50] PHP Fatal error: Call to a member function getPermissions() on a non-object in /var/www/virtual/sprintdatacenter.pl/application/modules/Application/src/Application/Plugin/Permissions.php on line 32"
},
{
"line" : "[Mon Nov 28 11:52:06.489927 2016] [:error] [pid 123456] [client 127.0.0.1:47599] PHP Parse error: syntax error, unexpected 'name' (T_STRING), expecting variable (T_VARIABLE) or '$' in /var/www/server/file.php on line 26, referer: http://example.net/example"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment