com.objectsql.spring.LogHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of object-sql Show documentation
Show all versions of object-sql Show documentation
Lightweight Object SQL Relational Mapping (OSRM)
The newest version!
package com.objectsql.spring;
import com.objectsql.handler.DebugHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class LogHandler implements DebugHandler {
private final Logger logger = LoggerFactory.getLogger(LogHandler.class);
@Override
public void handle(Class> clazz, String msg, Object... objects) {
if (objects != null && objects.length > 0){
LoggerFactory.getLogger(clazz).info("{}, {}", msg, objects[0]);
if (objects.length > 1){
List