How to use the pygelf.GelfUdpHandler function in pygelf

To help you get started, we’ve selected a few pygelf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github keeprocking / pygelf / tests / test_static_fields.py View on Github external
    GelfUdpHandler(host='127.0.0.1', port=12202, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfUdpHandler(host='127.0.0.1', port=12202, compress=False, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfHttpHandler(host='127.0.0.1', port=12203, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfHttpHandler(host='127.0.0.1', port=12203, compress=False, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfTlsHandler(host='127.0.0.1', port=12204, static_fields=STATIC_FIELDS),
    # GelfTlsHandler(host='127.0.0.1', port=12204, validate=True, ca_certs='tests/config/cert.pem', static_fields=STATIC_FIELDS, _ozzy='billie jean'),
])
def handler(request):
    return request.param
github keeprocking / pygelf / tests / test_custom_version.py View on Github external
    (GelfUdpHandler(host='127.0.0.1', port=12000, compress=False, version='11.5'), '11.5'),
    (GelfTlsHandler(host='127.0.0.1', port=12000, version='12.3'), '12.3')
])
def test_custom_version(handler, version):
    logger = logging.getLogger('test')
    logger.addHandler(handler)
    with mock.patch.object(handler, 'send') as send:
        message = log_and_decode(logger, send, 'custom version')
        assert message['version'] == version
    logger.removeHandler(handler)
github keeprocking / pygelf / tests / test_static_fields.py View on Github external
    GelfUdpHandler(host='127.0.0.1', port=12202, compress=False, **STATIC_FIELDS),
    GelfHttpHandler(host='127.0.0.1', port=12203, **STATIC_FIELDS),
    GelfHttpHandler(host='127.0.0.1', port=12203, compress=False, **STATIC_FIELDS),
    GelfTlsHandler(host='127.0.0.1', port=12204, **STATIC_FIELDS),
    # GelfTlsHandler(host='127.0.0.1', port=12204, validate=True, ca_certs='tests/config/cert.pem', **STATIC_FIELDS),
    GelfTcpHandler(host='127.0.0.1', port=12201, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfUdpHandler(host='127.0.0.1', port=12202, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfUdpHandler(host='127.0.0.1', port=12202, compress=False, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfHttpHandler(host='127.0.0.1', port=12203, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfHttpHandler(host='127.0.0.1', port=12203, compress=False, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfTlsHandler(host='127.0.0.1', port=12204, static_fields=STATIC_FIELDS),
    # GelfTlsHandler(host='127.0.0.1', port=12204, validate=True, ca_certs='tests/config/cert.pem', static_fields=STATIC_FIELDS, _ozzy='billie jean'),
])
def handler(request):
    return request.param
github keeprocking / pygelf / tests / test_inputs.py View on Github external
    GelfUdpHandler(host='127.0.0.1', port=12202, debug=True, compress=False, **ADDITIONAL_FIELDS),
    GelfHttpHandler(host='127.0.0.1', port=12203, debug=True, **ADDITIONAL_FIELDS),
    GelfHttpHandler(host='127.0.0.1', port=12203, debug=True, compress=False, **ADDITIONAL_FIELDS),
])
def handler(request):
    return request.param
github keeprocking / pygelf / tests / test_extra_fields.py View on Github external
    GelfUdpHandler(host='127.0.0.1', port=12000, compress=False, include_extra_fields=True),
    GelfTlsHandler(host='127.0.0.1', port=12000, include_extra_fields=True)
])
def handler(request):
    return request.param
github keeprocking / pygelf / tests / test_debug_mode.py View on Github external
    GelfUdpHandler(host='127.0.0.1', port=12202, debug=True),
    GelfUdpHandler(host='127.0.0.1', port=12202, compress=False, debug=True),
    GelfHttpHandler(host='127.0.0.1', port=12203, debug=True),
    GelfHttpHandler(host='127.0.0.1', port=12203, compress=False, debug=True),
    GelfTlsHandler(host='127.0.0.1', port=12204, debug=True),
    # GelfTlsHandler(host='127.0.0.1', port=12204, debug=True, validate=True, ca_certs='tests/config/cert.pem'),
])
def handler(request):
    return request.param
github keeprocking / pygelf / tests / test_common_fields.py View on Github external
    GelfUdpHandler(host='127.0.0.1', port=12202),
    GelfUdpHandler(host='127.0.0.1', port=12202, compress=False),
    GelfHttpHandler(host='127.0.0.1', port=12203),
    GelfHttpHandler(host='127.0.0.1', port=12203, compress=False),
    GelfTlsHandler(host='127.0.0.1', port=12204),
    # GelfTlsHandler(host='127.0.0.1', port=12204, validate=True, ca_certs='tests/config/cert.pem'),
])
def handler(request):
    return request.param
github keeprocking / pygelf / tests / test_debug_mode.py View on Github external
    GelfUdpHandler(host='127.0.0.1', port=12202, compress=False, debug=True),
    GelfHttpHandler(host='127.0.0.1', port=12203, debug=True),
    GelfHttpHandler(host='127.0.0.1', port=12203, compress=False, debug=True),
    GelfTlsHandler(host='127.0.0.1', port=12204, debug=True),
    # GelfTlsHandler(host='127.0.0.1', port=12204, debug=True, validate=True, ca_certs='tests/config/cert.pem'),
])
def handler(request):
    return request.param
github keeprocking / pygelf / tests / test_static_fields.py View on Github external
    GelfUdpHandler(host='127.0.0.1', port=12202, compress=False, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfHttpHandler(host='127.0.0.1', port=12203, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfHttpHandler(host='127.0.0.1', port=12203, compress=False, static_fields=STATIC_FIELDS, _ozzy='billie jean'),
    GelfTlsHandler(host='127.0.0.1', port=12204, static_fields=STATIC_FIELDS),
    # GelfTlsHandler(host='127.0.0.1', port=12204, validate=True, ca_certs='tests/config/cert.pem', static_fields=STATIC_FIELDS, _ozzy='billie jean'),
])
def handler(request):
    return request.param
github keeprocking / pygelf / tests / test_queuehandler_support.py View on Github external
    GelfUdpHandler(host='127.0.0.1', port=12202, compress=False),
    GelfHttpHandler(host='127.0.0.1', port=12203),
    GelfHttpHandler(host='127.0.0.1', port=12203, compress=False),
    GelfTlsHandler(host='127.0.0.1', port=12204),
    # GelfTlsHandler(host='127.0.0.1', port=12204, validate=True, ca_certs='tests/config/cert.pem'),
])
def handler(request):
    return request.param