Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save krystianbuczak/e6c15cfc17567360fb9e to your computer and use it in GitHub Desktop.
Save krystianbuczak/e6c15cfc17567360fb9e to your computer and use it in GitHub Desktop.
Drupal syslog regex configuration for Pimp My Log php log viewer
// paste it in your config.user.php configuration file in section files: {}
"syslog": {
"display" : "Drupal",
"path" : "\/var\/log\/drupal.log", //set your Drupal syslog file path
"refresh" : 5,
"max" : 10,
"notify" : true,
"order" : -1,//set order you want
"sort" : "Date",
"thinit" : [ "Date", "Site", "Type", "Request", "Referer", "UID", "Message" ],
"format" : {
"regex" : "|^.*drupal: (.*)\\|(.*)\\|(.*)\\|(.*)\\|(.*)\\|(.*)\\|(.*)\\|(.*)\\|(.*)$|U",
"export_title" : "Drupal",
"match" : {
"Site" : 1,
"Date" : {
"U" : 2
},
"Type" : 3,
"IP" : 4,
"Request" : 5,
"Referer" : 6,
"UID" : 7,
"Link" : 8,
"Message" : 9
},
"types": {
"Site" : "link",
"Date" : "date:Y-m-d H:i:s",
"Type" : "txt",
"IP" : "ip:http",
"Request" : "txt",
"Referer" : "link",
"UID" : "txt",
"Link" : "link",
"Message" : "pre"
},
"exclude": {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment