All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openmetadata.service.events.AuditLogger Maven / Gradle / Ivy

There is a newer version: 1.5.11
Show newest version
package org.openmetadata.service.events;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;

public final class AuditLogger {

  private static final Marker AUDIT_MARKER = MarkerFactory.getMarker("AUDIT");

  @SuppressWarnings("PMD:LoggerIsNotStaticFinal")
  private final Logger logger;

  private AuditLogger(final Class clazz) {
    logger = LoggerFactory.getLogger(clazz);
  }

  public static AuditLogger getLogger(final Class clazz) {
    return new AuditLogger(clazz);
  }

  public void log(final String message) {
    logger.error(AUDIT_MARKER, message);
  }

  public void log(final String format, final Object... arguments) {
    logger.error(AUDIT_MARKER, format, arguments);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy