pwperformance.loggers.influxdb module¶
- class pwperformance.loggers.influxdb.BufferingInfluxHandler(indexed_keys=None, debugging_fields=True, extra_fields=True, localname=None, measurement=None, level_names=False, capacity=64, flush_interval=5, backpop=True, **client_kwargs)[source]¶
Bases:
pwperformance.loggers.influxdb.InfluxHandler
,logging.handlers.BufferingHandler
InfluxDB Log handler
- Parameters
indexed_keys – The names of keys to be treated as keys (as opposed to fields) in influxdb.
debugging_fields – Send debug fields if true (the default).
extra_fields – Send extra fields on the log record to graylog if true (the default).
localname – Use specified hostname as source host.
measurement – Replace measurement with specified value. If not specified, record.name will be passed as logger parameter.
level_names – Allows the use of string error level names instead of numerical values. Defaults to False
capacity – The number of points to buffer before sending to InfluxDB.
flush_interval – Interval in seconds between flushes, maximum. Defaults to 5 seconds
client_kwargs – Pass these args to the InfluxDBClient constructor
- class pwperformance.loggers.influxdb.InfluxHandler(token='unset', bucket='unset', org='unset', url='http://localhost:8086', indexed_keys=['level', 'short_message'], debugging_fields=True, extra_fields=True, localname=None, measurement=None, level_names=False, backpop=True, **client_kwargs)[source]¶
Bases:
logging.Handler
InfluxDB Log handler
- Parameters
database – The database you want log entries to go into.
indexed_keys – The names of keys to be treated as keys (as opposed to fields) in influxdb.
debugging_fields – Send debug fields if true (the default).
extra_fields – Send extra fields on the log record to graylog if true (the default).
localname – Use specified hostname as source host.
measurement – Replace measurement with specified value. If not specified, record.name will be passed as logger parameter.
level_names – Allows the use of string error level names instead of numerical values. Defaults to False
client_kwargs – Pass these args to the InfluxDBClient constructor