Version 1.3 released

Hi folks!

This new version gives you the ability to split user configuration in several files.

In the backstage, I have rewritten a lot of things for the next upcoming version 1.5. A lot of features are on the road...


There is a new USER_CONFIGURATION_DIR global configuration parameter.

You can split your files configuration file in several parts. config.user.json is mandatory and you can add files parts in several files in a folder. By default, this folder is named config.user.d and is next to config.user.json file. But you can change the location. Changing this folder is useful if you have several Pimp my Log instances on the same server and want to share some configurations.

All files are recursively parsed in this folder and in its all sub-folders.

Only files with json extension are parsed.

Here is config.user.d/httpd.json for example :

{
    "apache1": {
        "display" : "Apache Error #1",
        "path"    : "\/var\/log\/apache2\/error.log",
        "refresh" : 5,
        "max"     : 10,
        "notify"  : true,
        "format"  : {
            "type" : "HTTPD 2.2",
            "regex": "|^\\[(.*)\\] \\[(.*)\\] (\\[client (.*)\\] )*((?!\\[client ).*)(, referer: (.*))*$|U",
            "match": {
                "Date"     : 1,
                "IP"       : 4,
                "Log"      : 5,
                "Severity" : 2,
                "Referer"  : 7
            },
            "types": {
                "Date"     : "date:H:i:s",
                "IP"       : "ip:http",
                "Log"      : "pre",
                "Severity" : "badge:severity",
                "Referer"  : "link"
            },
            "exclude": {
                "Log": ["\/PHP Stack trace:\/", "\/PHP *[0-9]*\\. \/"]
            }
        }
    }
}

Warning

This folder, its sub-folders and inner files have to be readable and crossable by the webserver user.

No warning is thrown if the webserver user cannot have access to a file or a folder.

Default:

"USER_CONFIGURATION_DIR" : "config.user.d"

Published on 12 October 2014 in General
Tags :
changelog release

comments powered by Disqus