Configuration

Every Gishiki Application need to be configured in order to properly work.

This is done by creating a json file called settings.json, you can use any other name but you'll also need to pass that file name as a parameter o the Application constructor.

A settings file has a fixed (minimum) structure:

{
    "logging": {
        "autolog": "default",
        "interfaces": {
            "default": [
                {
                    "class": "StreamHandler",
                    "connection": [
                        "customLog.log",
                        400
                    ]
                }
            ]
        }
    },
    "connections": [
        {
            "name": "default",
            "query": "sqlite:\/\/default.sqlite"
        },
        {
            "name": "local",
            "query": "sqlite://relative/path/to/db.sqlite"
        },
        {
             "name": "debug",
             "query": "sqlite:///absolute/path/to/db.sqlite"
        }
    ]
}

As you might have thought those {{@VAR_NAMES}} are replaced with constants defined in your environment AND/OR Heroku (or similar) "Config Variables"!

This is a GREAT feature that keeps SECRET your database connection descriptor and your master server key while allowing application portability among multiple environments!

Automatic Logger

The automatic logger is automatically used to store log entries generated by exceptions.

To understand how to connect a logger it is important to read the Logging chapter of this manual.