Audit4j-core FileAuditHandler variable "path" versus getProperty("log.file.location")

33 views
Skip to first unread message

Franck Benault

unread,
Dec 22, 2017, 5:48:02 PM12/22/17
to Audit4j
For my understanding the variable "path" of FileAuditHandler is not used.
the full path of the audit file is defined by the value associated to the key "log.file.location" in the map property

I would say it is more logical to have a variable path than have a log.file.location key
because this path is a property related to FileAuditHandler only.
but the risk is now the user will have to change their configuration
So I suggest to remove the variable path inside FileAuditHandler

What do you suggest
1) removing this variable Path in this FileHandler
2) or change the init method of the FileHandler
writer = new ZeroCopyFileWriter(getProperty("log.file.location"));
to writer = new ZeroCopyFileWriter(path);
+ add getter for the path (for xml configuration)

Franck Benault

unread,
Dec 22, 2017, 5:59:34 PM12/22/17
to Audit4j
Hello,

I have created the pull request

removing path variable

Regards Franck

Janith Bandara

unread,
Dec 27, 2017, 5:42:46 AM12/27/17
to Audit4j
Hi Franck,

I agree to have path variable is more logical than log.file.location as property key. 

we can have both configuration for now but he logic should be "log.file.location" is not available, Path variable is selected. This way "log.file.location" can be eliminated in the future versions.

I would not suggest not to remove path variable for now.

Regards,
Janith

Franck Benault

unread,
Dec 27, 2017, 2:26:10 PM12/27/17
to Audit4j
Hello

thanks for your answer

I have closed the pull request 63 https://github.com/audit4j/audit4j-core/pull/63

Regards Franck
Reply all
Reply to author
Forward
0 new messages