test_class.declarator: auditor
test_class.modifier: private
test_class.original_string: private Auditor auditor;
test_class.type: Auditor
test_class.var_name: auditor
test_class.file: auditor-log4j/src/test/java/ro/fortsoft/auditor/log4j/Log4jAuditorTest.java
test_class.identifier: Log4jAuditorTest
test_case.body: @Test
      public void logEvent() {
          auditor.audit(new AuditEvent("Login").setUsername("decebal1").setSession(getUUID()).setIp("localhost"));
      }
test_case.class_method_signature: Log4jAuditorTest.logEvent()
test_case.full_signature: @Test public void logEvent()
test_case.identifier: logEvent
test_case.invocations: audit setIp setSession setUsername getUUID
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void logEvent()
focal_class.declarator: log
focal_class.modifier: private final
focal_class.original_string: private final Logger log;
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: auditor-log4j/src/main/java/ro/fortsoft/auditor/log4j/Log4jAuditor.java
focal_class.identifier: Log4jAuditor
focal_class.interfaces: implements Auditor
focal_class.class_method_signature: Log4jAuditor.Log4jAuditor()
focal_class.full_signature: public  Log4jAuditor()
focal_class.identifier: Log4jAuditor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Log4jAuditor()
focal_class.class_method_signature: Log4jAuditor.Log4jAuditor(String loggerName)
focal_class.full_signature: public  Log4jAuditor(String loggerName)
focal_class.identifier: Log4jAuditor
focal_class.modifiers: public
focal_class.parameters: (String loggerName)
focal_class.signature:  Log4jAuditor(String loggerName)
focal_class.class_method_signature: Log4jAuditor.audit(AuditEvent event)
focal_class.full_signature: @SuppressWarnings("unchecked") public void audit(AuditEvent event)
focal_class.identifier: audit
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (AuditEvent event)
focal_class.return: void
focal_class.signature: void audit(AuditEvent event)
focal_class.class_method_signature: Log4jAuditor.initFromMDC(AuditEvent event)
focal_class.full_signature: protected void initFromMDC(AuditEvent event)
focal_class.identifier: initFromMDC
focal_class.modifiers: protected
focal_class.parameters: (AuditEvent event)
focal_class.return: void
focal_class.signature: void initFromMDC(AuditEvent event)
focal_method.body: @SuppressWarnings("unchecked")
      public void audit(AuditEvent event) {
          initFromMDC(event);
  
          // create the logging event from audit event
          LoggingEvent loggingEvent = new LoggingEvent(log.getName(), log, Level.DEBUG, event.getAction(), null);
          loggingEvent.setProperty("username", event.getUsername());
          loggingEvent.setProperty("session", event.getSession());
          loggingEvent.setProperty("ip", event.getIp());
  
          // add the logging event to all appenders
          Enumeration<Appender> en = log.getAllAppenders();
          while (en.hasMoreElements()) {
              en.nextElement().doAppend(loggingEvent);
          }
      }
focal_method.class_method_signature: Log4jAuditor.audit(AuditEvent event)
focal_method.full_signature: @SuppressWarnings("unchecked") public void audit(AuditEvent event)
focal_method.identifier: audit
focal_method.invocations: initFromMDC getName getAction setProperty getUsername setProperty getSession setProperty getIp getAllAppenders hasMoreElements doAppend nextElement
focal_method.modifiers: @SuppressWarnings("unchecked") public
focal_method.parameters: (AuditEvent event)
focal_method.return: void
focal_method.signature: void audit(AuditEvent event)