New Features
Custom config file
Now it's possible to use custom config files, instead of depending on the old `local -> dev -> prod` order.
$ apys -s --config=my_config
or
$ apys -s -c my_config
Log files
Log is not fixed to std anymore, now you can choose a file to log
You can choose a unique log file
json
{
"log": {
"file": "myfile.log"
}
}
Or one for debug and one for errors
json
{
"log": {
"file": {
"debug": "mydebugfile.log",
"error": "myerrorfile.log"
}
}
}
> Knowing that you will have to log with `api.debug` and `api.error`
Also, you can define a custom log file
json
{
"log": {
"file": {
"debug": "mydebugfile.log",
"error": "myerrorfile.log",
"custom": "mycustomfile.log"
}
}
}
And then call it on log:
python
api.debug('my message', to='custom')
Example
See [demo/log_to_file](https://github.com/seijihirao/apys/tree/master/demo/log_to_file) for an example