<commit_before># See https://docs.python.org/2/library/logging.config.html#logging-config-fileformat
# for more information
[formatters]
keys=detail

[handlers]
keys=file,mail

[formatter_detail]
class=privacyidea.lib.log.SecureFormatter
format=[%(asctime)s][%(process)d][%(thread)d][%(levelname)s][%(name)s:%(lineno)d] %(message)s

[handler_mail]
class=logging.handlers.SMTPHandler
level=ERROR
formatter=detail
args=('themis.az.local', '<EMAIL>', ['<EMAIL>'], 'PI Error')

[handler_file]
# Rollover the logfile at midnight
class=logging.handlers.RotatingFileHandler
backupCount=14
maxBytes=10000000
formatter=detail
level=DEBUG
args=('/var/log/privacyidea/privacyidea.log')

[loggers]
keys=root,privacyidea

[logger_privacyidea]
handlers=file,mail
qualname=privacyidea
level=DEBUG

[logger_root]
level=NOTSET
handlers=file<commit_msg>add more detailed logging.<commit_after># See https://docs.python.org/2/library/logging.config.html#logging-config-fileformat
# for more information
[formatters]
keys=detail

[handlers]
keys=file,mail

[formatter_detail]
class=privacyidea.lib.log.SecureFormatter
format=[%(asctime)s][%(process)d][%(thread)d][%(levelname)s][%(name)s:%(lineno)d] %(message)s

[handler_mail]
class=logging.handlers.SMTPHandler
level=ERROR
formatter=detail
args=('themis.az.local', '<EMAIL>', ['<EMAIL>'], 'PI Error')

[handler_file]
# Rollover the logfile at midnight
class=logging.handlers.RotatingFileHandler
formatter=detail
level=DEBUG
args=('/var/log/privacyidea/privacyidea.log')
# Limit log file to 10MB
# keep 14 backups of the log file
#args=('/var/log/privacyidea/privacyidea.log', 'a', 10000000, 14)

[loggers]
keys=root,privacyidea

[logger_privacyidea]
handlers=file,mail
qualname=privacyidea
level=DEBUG

[logger_root]
level=NOTSET
handlers=file
{'fraction_non_alphanumeric': 0.15267605633802817, 'fraction_numerical': 0.014647887323943662, 'mean_word_length': 8.866666666666667, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5479172', 'n_tokens_mistral': 673, 'n_tokens_neox': 633, 'n_words': 104}