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

no.nav.common.audit_log.log.AuditLoggerImpl Maven / Gradle / Ivy

There is a newer version: 2.2023.01.10_13.49-81ddc732df3a
Show newest version
package no.nav.common.audit_log.log;

import no.nav.common.audit_log.cef.CefMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static no.nav.common.audit_log.log.AuditLoggerConstants.AUDIT_LOGGER_NAME;

public class AuditLoggerImpl implements AuditLogger {

    private final Logger log;

    public AuditLoggerImpl(Logger log) {
        this.log = log;
    }

    public AuditLoggerImpl() {
        log = LoggerFactory.getLogger(AUDIT_LOGGER_NAME);
    }

    @Override
    public void log(CefMessage message) {
        log.info(message.toString());
    }

    @Override
    public void log(String message) {
        log.info(message);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy