com.dke.data.agrirouter.api.service.RequestLogging Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of agrirouter-api-java-api Show documentation
Show all versions of agrirouter-api-java-api Show documentation
This project contains the API for the communication with the agrirouter. Everything you need for the onboarding process, secure communication and much more.
package com.dke.data.agrirouter.api.service;
import javax.ws.rs.core.Response;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public interface RequestLogging {
Logger logger = LogManager.getLogger(RequestLogging.class);
default void logRequest(String className, Response response) {
String logMessage = "\n" + "# [" + className + "] " + "\n" + response + "\n";
this.logger.info(() -> logMessage);
}
}