Skip to content

Commit 9c4cede

Browse files
author
manico.james
committed
added EventType logging back in
1 parent 5180e8d commit 9c4cede

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎src/main/java/org/owasp/esapi/reference/JavaLogFactory.java‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,15 @@ private void log(Level level, EventType type, String message, Throwable throwabl
302302
// log user information - username:session@ipaddr
303303
User user = ESAPI.authenticator().getCurrentUser();
304304
String userInfo = "";
305-
if ( user != null && type != null) {
306-
userInfo = user.getAccountName()+ ":" + sid + "@"+ user.getLastHostAddress();
305+
//TODO - Make Type Logging configurable
306+
if (type != null) {
307+
userInfo += type;
308+
}
309+
if ( user != null) {
310+
if (type != null) {
311+
userInfo += " ";
312+
}
313+
userInfo += user.getAccountName()+ ":" + sid + "@"+ user.getLastHostAddress();
307314
}
308315

309316
// log server, port, app name, module name -- server:80/app/module

0 commit comments

Comments
 (0)