Output syslog of the json format.
Project description
Flask-Json-SysLog
-----------------
Output syslog of the json format.
Installation
````````````
Use pip.
.. code:: bash
# pip install flask-json-syslog
In your app.py
``````````````
.. code:: python
from flask import g
from flask_json_syslog import FlaskJsonSyslog
app = Flask(__name__)
flask_json_syslog = FlaskJsonSyslog(app)
...
@app.before_request
def before_request():
g.json_log = flask_json_syslog.put
In your application code.
`````````````````````````
.. code:: python
g.json_log({'foo': 'bar'}, ...)
(r)syslog.conf
``````````````
$template json,"%msg%
"
local5.* /var/log/local5.log;json
Links
`````
* `website <https://github.com/nabetama/Flask-Json-Syslog>`_
-----------------
Output syslog of the json format.
Installation
````````````
Use pip.
.. code:: bash
# pip install flask-json-syslog
In your app.py
``````````````
.. code:: python
from flask import g
from flask_json_syslog import FlaskJsonSyslog
app = Flask(__name__)
flask_json_syslog = FlaskJsonSyslog(app)
...
@app.before_request
def before_request():
g.json_log = flask_json_syslog.put
In your application code.
`````````````````````````
.. code:: python
g.json_log({'foo': 'bar'}, ...)
(r)syslog.conf
``````````````
$template json,"%msg%
"
local5.* /var/log/local5.log;json
Links
`````
* `website <https://github.com/nabetama/Flask-Json-Syslog>`_
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.