コード例 #1
0
 public void logI18nMessageWithUsername(
     final String key, final String username, final String... params) {
   lastModified = new Date(clock.currentTimeMillis());
   AuditLogEntry entry =
       new AuditLogEntryImpl(username, lastModified, key, EntryType.valueOfI18n(key), params);
   try {
     saveEntryAndPurge(entry);
   } catch (IOException e) {
     throw new AuditLoggingException("Failed to log message: " + entry, e);
   }
   log.info(entry.getMessage(i18nResolver));
 }
コード例 #2
0
 public int compare(AuditLogEntry entry1, AuditLogEntry entry2) {
   return entry1.compareTo(entry2);
 }
コード例 #3
0
 public boolean apply(AuditLogEntry entry) {
   return entryTypes.contains(entry.getEntryType());
 }