init
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.newyetai.common.log.provider;
|
||||
|
||||
import com.newyetai.common.log.ILogProvider;
|
||||
import com.newyetai.common.util.JsonUtils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-01-21
|
||||
*/
|
||||
@Slf4j
|
||||
public class Slf4jLogProvider implements ILogProvider {
|
||||
|
||||
@Override
|
||||
public void log(Object object) {
|
||||
try {
|
||||
log.info("class:{}, obj:{}", object.getClass(), JsonUtils.toJsonString(object));
|
||||
} catch (Exception e) {
|
||||
log.error("cant log:{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user