Audit log entries being skipped due to field overflow?

I see my privacyidea.log file filled with numerous sqlaudit errors of ‘Data too long for column’ in action, action_detail, and info. Ensuring I capture all of the events in the audit log is important to me. Would altering the column sizes be a possibility?

For example, a scrubbed entry is below:
[2019-03-06 15:09:45,647][25931][140279571646208][ERROR][privacyidea.lib.auditmodules.sqlaudit:273] exception DataError(’(pymysql.err.DataError) (1406, u"Data too long for column ‘action_detail’ at row 1")’,)
[2019-03-06 15:09:45,648][25931][140279571646208][ERROR][privacyidea.lib.auditmodules.sqlaudit:274] DATA: {‘info’: u’set_pinchange_date’, ‘realm’: u’myreal’, ‘success’: True, ‘privacyidea_server’: ‘srvr.example.com’, ‘client_user_agent’: None, ‘token_type’: u’email’, ‘client’: ‘127.0.0.1’, ‘user’: u’123456’, ‘resolver’: u’employee’, ‘action_detail’: “{u’value’: u’{current_time}’, u’key’: u’last_pin_change’}”, ‘action’: ‘POST-EVENT token_setpin>>Token:set tokeninfo’, ‘serial’: u’PIEM00000000’}

Hi droo,

as a first step you could set PI_AUDIT_SQL_TRUNCATE = True. Alternatively, you could enlarge the columns accordingly. See https://privacyidea.readthedocs.io/en/latest/audit/index.html#table-size

Thank you for the information. I missed that portion of the documentation.