idstools.rulecat.loghandler module

class idstools.rulecat.loghandler.SuriColourLogHandler(stream=None)[source]

Bases: logging.StreamHandler

An alternative stream log handler that logs with Suricata inspired log colours.

BLUE = '\x1b[34m'
GREEN = '\x1b[32m'
ORANGE = '\x1b[38;5;208m'
RED = '\x1b[31m'
REDB = '\x1b[1;31m'
RESET = '\x1b[0m'
YELLOW = '\x1b[33m'
YELLOWB = '\x1b[1;33m'
emit(record)[source]
formatTime(record)[source]