-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new logging for page views including user viewing the page
- Loading branch information
1 parent
7eff2de
commit 190bdb9
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
Service/src/main/java/org/gusdb/wdk/service/PageViewLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.gusdb.wdk.service; | ||
|
||
import static org.gusdb.fgputil.FormatUtil.TAB; | ||
|
||
import org.apache.log4j.Logger; | ||
import org.gusdb.wdk.model.user.User; | ||
|
||
public class PageViewLogger { | ||
|
||
private static final Logger LOG = Logger.getLogger(PageViewLogger.class); | ||
|
||
public static void logPageView(String projectId, User user, String pagePath) { | ||
LOG.info( | ||
TAB + user.getUserId() + | ||
TAB + (user.isGuest() ? "guest" : "reg") + | ||
TAB + projectId + | ||
TAB + pagePath); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters