grails-audit-logging-plugin icon indicating copy to clipboard operation
grails-audit-logging-plugin copied to clipboard

GPAUDITLOGGING-60: Make logged format configurable for Date/Calendar/DateTime values

Open robertoschwald opened this issue 10 years ago • 1 comments

Original Reporter: smaerkle Environment: grails 2.3.5 Version: Grails-AuditLogging 0.5.5.3 Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-60

We use an audited domain object that is manipulated by a webservice.

Logging for Date type columns is ugly, since in our case, oldValue is of Timestamp or Date type (hibernate mapping of a Date type), newValue is an XMLGregorianCalendar (cxf mapping of a Date type). Since Auditlog uses toString(), the entries differ in format.

Taken the date_created column into account, there are three different date formats involved in a single audit_log row, e.g.:

date_created 2014-03-19 15:04:32.137 new_value Tue Mar 18 15:04:31 CET 2014 old_value 2014-03-20 00:00:00.0

We'd like to see the String representation for Dates configurable (for example by a SimpleDateFormat format String).

robertoschwald avatar Mar 25 '14 04:03 robertoschwald

roos said: PR welcome.

robertoschwald avatar Jul 02 '14 00:07 robertoschwald