Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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
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
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
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
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
GelfHttpHandler(host='127.0.0.1', port=12203, compress=False, include_extra_fields=True),
GelfTlsHandler(host='127.0.0.1', port=12204, include_extra_fields=True),
# GelfTlsHandler(host='127.0.0.1', port=12204, validate=True, ca_certs='tests/config/cert.pem', include_extra_fields=True),
])
def handler(request):
return request.param
GelfHttpHandler(host='127.0.0.1', port=12203, include_extra_fields=True),
GelfHttpHandler(host='127.0.0.1', port=12203, compress=False, include_extra_fields=True),
GelfTlsHandler(host='127.0.0.1', port=12204, include_extra_fields=True),
# GelfTlsHandler(host='127.0.0.1', port=12204, validate=True, ca_certs='tests/config/cert.pem', include_extra_fields=True),
])
def handler(request):
return request.param
port = port[0]
# Check if the remote server is up and accepts connections; if not we will
# skip the handler
try:
with socket.create_connection((host, port), timeout=1):
pass
except OSError as e:
getlogger().warning(
f"could not connect to Graylog server at '{address}': {e}"
)
return None
extras = site_config.get(f'{config_prefix}/extras')
return pygelf.GelfHttpHandler(host=host, port=port, debug=True,
static_fields=extras,
include_extra_fields=True)