audit4j / audit4j-core

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

added ObjectToJsonSerializer #52

Closed yangziwen closed 7 years ago

yangziwen commented 7 years ago

Hi @janithb

This is my implementation of ObjectToJsonSerializer. The json lib I used is fastjson, which is released by Alibaba (The largest e-commerce company in China). It provides powerful and friently api, and has an excellent performance.

The template I used in CustomizableLayout is as follows ${eventDate} AuditLog |${actor}|${action}|${origin}|{${foreach fields field ,}${field.name}:${field.value}${end}}

Hope this can have some help to audit4j.

janithb commented 7 years ago

HI @yangziwen

Sounds good, Thanks a lot for the PR, I'll merge this with the audit4j core. However Its better to have a way to use Json serializer without using customized layout. I'll find a way to improve this. Thanks again. 👍