MYSQL logs

objecttothis's Avatar

objecttothis

10 Aug, 2017 11:20 AM

The MYSQL configuration offered on the support site did not work for me so I reworked it and pasted it below. I am running a FAMP server with MySQL 5.7. The main differences were the date formatting (4-digit year, letter T between date and time) and I had to add severity. Hope this helps. Also, it would be cool if you could integrate MySQL logs into your php configuration script like you have for apache and php

{
  "SOFTWARE_ID": {
    "display" : "SOFTWARE NAME",
    "path" : "SOFTWARE PATH",
    "format" : {
      "multiline": "0",
      "regex" : "|^(.{4})-(.{2})-(.{2})T(.*):(.*):(.*) (.*) \\[(.*)\\] (.*)$|U",
      "match" : {
             "Date" : [
                 1,
                     "-",
2,
     "-",
         3,
             " ",
                 4,
                     ":",
5,
     ":",
         6
             ],
                 "Engine" : 7,
                        "Severity" : 8,
"Log" : 9
     },
      "types" : {
"Date" : "date:d\/m\/Y H:i:s \/100",
     "Engine" : "txt",
"Severity" : "badge:severity",
         "Log" : "txt"
             }
    }
  }
}

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac