.. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/eea.graylogger/develop :target: https://ci.eionet.europa.eu/job/eea/job/eea.graylogger/job/develop/display/redirect :alt: develop .. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/eea.graylogger/master :target: https://ci.eionet.europa.eu/job/eea/job/eea.graylogger/job/master/display/redirect :alt: master
GELF (Graylog Extended Log Format) for Zope event logs
.. contents::
Add eea.graylogger
_ to your eggs section in your buildout and re-run buildout
::
[instance] eggs += eea.graylogger
event-log-handler = eea.graylogger.GELFHandler event-log-args = ('logs.example.com', 12201) event-log-kwargs = {'level_names': True, 'facility': 'example.com'}
access-log-handler = eea.graylogger.GELFHandler access-log-args = ('logs.example.com', 12201) access-log-kwargs = {'facility': 'example.com'}
See graypy
_ documentation for more details.
Alternatively, you can skip -log-args
and -log-kwargs
and use environment variables to
define Graylog host:port
and facility
:
::
[instance]
eggs +=
eea.graylogger
event-log-handler = eea.graylogger.GELFHandler
access-log-handler = eea.graylogger.GELFHandler
GRAYLOG
- Graylog host
, or host:port
(e.g.: GRAYLOG=logs.example.com:12201
)GRAYLOG_FACILITY
- Graylog facility (e.g.: GRAYLOG_FACILITY=example.com
)Add eea.graylogger
_ to your eggs section in your buildout and re-run buildout.
You can download a sample buildout from
https://github.com/eea/eea.graylogger/tree/master/buildouts/plone4
::
[instance] eggs = ... eea.graylogger
zope-conf-imports = eea.graylogger
event-log-custom =
Graylog2 Docker image
graypy
_ documentation for more details.logging.gelf
. A queue binding must
be defined on the server to prevent log messages from being dropped.plone.recipe.zope2instance
_ >= 6.5.0The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.
The EEA Graylogger (the Original Code) is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
More details under docs/License.txt
EEA_ - European Environment Agency (EU)
.. EEA
: https://www.eea.europa.eu/
.. Graylog
: https://www.graylog.org
.. graypy
: https://pypi.org/project/graypy/
.. Graylog2 Docker image
: https://github.com/eea/eea.docker.graylog2
.. eea.graylogger
: https://github.com/eea/eea.graylogger
.. plone.recipe.zope2instance
: https://pypi.org/project/plone.recipe.zope2instance