Very simple log format

Henrik Gemal's Avatar

Henrik Gemal

09 Jan, 2014 08:20 PM

I use CakePHP as a platform.

The log format is very basic:
2014-01-02 21:44:05 Error id 10 was not found

how can I add this very basic logformat to your wonderful Pimp my Log ?

I tried reading the documentaiton but I wasn't sure

  1. Support Staff 1 Posted by potsky on 10 Jan, 2014 11:02 AM

    potsky's Avatar

    Hi Henrik!

    sometimes you know... simple is complex :-)

    In fact, your date format is not supported now. I will add more date types in a few minutes and release Pimp My Log 0.9.5.

  2. Support Staff 2 Posted by potsky on 10 Jan, 2014 11:10 AM

    potsky's Avatar

    Ok, version 0.9.5 is published!

    You can configure CakePHP logs like this :

     "files": {
            "cakephp": {
                "display" : "Cake PHP",
                "path"    : "/opt/local/apache2/logs/cakephp.log",
                "refresh" : 5,
                "max"     : 10,
                "notify"  : true,
                "format"  : {
                    "regex": "|^(.*)-(.*)-(.*) (.*):(.*):(.*) (.*)$|U",
                    "match": {
                        "Date" : {
                            "Y" : 1,
                            "m" : 2,
                            "d" : 3,
                            "H" : 4,
                            "i" : 5,
                            "s" : 6
                        },
                        "Log" : 7
                    },
                    "types": {
                        "Date" : "date:Y-m-d H:i:s",
                        "Log"  : "pre"
                    }
                }
            }
    ...
    

    I will update the documentation about date tricks

  3. potsky closed this discussion on 10 Jan, 2014 11:10 AM.

  4. potsky re-opened this discussion on 10 Jan, 2014 11:10 AM

  5. 3 Posted by Henrik Gemal on 10 Jan, 2014 07:33 PM

    Henrik Gemal's Avatar

    it kind of worked, since something the errors can be multi line like

    2014-01-02 21:44:05 Error id 10 was not found . dump was:
    array("test" => array(
    "dsakldak" => 1 ))

  6. Support Staff 4 Posted by potsky on 10 Jan, 2014 07:41 PM

    potsky's Avatar

    ok, I understand...

    1. I can close this discussion
    2. The related problem refers to this discussion
  7. potsky closed this discussion on 10 Jan, 2014 07:41 PM.

Comments are currently closed for this discussion. You can start a new one.

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