audit4j / audit4j-core

An open source auditing framework.
http://audit4j.org
Apache License 2.0
125 stars 77 forks source link

audit4j-core SimpleLayout #46

Closed sdcavanaugh closed 6 years ago

sdcavanaugh commented 8 years ago

Using audit4j.conf.yaml for configuration. When I configure a SimpleLayout with a dateFormat like this

layout: !org.audit4j.core.layout.SimpleLayout { dateFormat: "yyyy-MM-dd HH:mm:ss" }

I get a this exception:

Caused by: com.esotericsoftware.yamlbeans.YamlReader$YamlReaderException: Line 7, column 13: > Unable to find property 'dateFormat' on class: org.audit4j.core.layout.SimpleLayout

Adding public String getDateFormat() method to SimpleLayout seems to correct this.

franck-benault commented 6 years ago

The version 2.5.0 of audit4j-core solves this issue

janithb commented 6 years ago

Fixed

carlz2k commented 6 years ago

I am using 2.5.0 still got the following error:

Caused by: com.esotericsoftware.yamlbeans.YamlReader$YamlReaderException: Line 10, column 12: Unable to find property 'template' on class: org.audit4j.core.layout.CustomizableLayout

layout: !org.audit4j.core.layout.CustomizableLayout

dateFormat: yyyy/MM/dd HH:mm:ss

template: ${eventDate}|${uuid}|${actor}|${action}|${origin} => ${foreach fields field [${field.name}:${field.value}]${end}

franck-benault commented 6 years ago

This issue has been solved in the code, but is not yet integrated in a version please look at this issue https://github.com/audit4j/audit4j-core/issues/71

I will ask to create a new version of audit4j-core