The code to do informational logging (see the commit 634fcbe5 merge) is a bit repetitive and could be further abstracted. Basically, we should create src/main/java/org/openhmis/util/LogUtil.java providing a new a LogUtil class, with at least these three methods:
public static logNamedEntity(String method, String endpoint, Int id) { ... }
public static logCreation(String method, String endpoint, Int newId { ... }
public static logResultSet(String method, String endpoint, Int numResults) { ... }
The code to do informational logging (see the commit 634fcbe5 merge) is a bit repetitive and could be further abstracted. Basically, we should create
src/main/java/org/openhmis/util/LogUtil.java
providing a new aLogUtil
class, with at least these three methods:corresponding respectively to:
(Well, we might also need a method or two to handle authn event logging specially.)
Then we could add more methods as we need them, and be assured that our log format would always be consistent.