本文整理了Java中lombok.extern.log4j.Log4j
类的一些代码示例,展示了Log4j
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log4j
类的具体详情如下:
包路径:lombok.extern.log4j.Log4j
类名称:Log4j
暂无
代码示例来源:origin: timebusker/spring-boot
@Service
@Primary
@Log4j
public class BaseUserService implements UserService {
代码示例来源:origin: puppetlabs/europa
@Log4j
public class BaseDb
{
protected static AttrDescription attr(String name, AttrType type) {
return AttrDescription.builder()
.attrName(name)
.attrType(type)
.build();
}
}
代码示例来源:origin: puppetlabs/europa
@Log4j
public class EuropaConfigurationProvider implements Provider<EuropaConfiguration>
{
private EuropaConfiguration _europaConfiguration;
public EuropaConfigurationProvider(EuropaConfiguration europaConfiguration)
{
_europaConfiguration = europaConfiguration;
}
@Override
public EuropaConfiguration get() {
return _europaConfiguration;
}
}
代码示例来源:origin: puppetlabs/europa
@Log4j
public class WebAppRoutes
{
private static final RouteMatcher ROUTES = new RouteMatcher();
public static RouteMatcher getRouteMatcher() {
return ROUTES;
}
static {
//Add the routes below this line
//Ajax Routes
ROUTES.add("GET", "/ajax", AjaxRequestHandler.class);
ROUTES.add("POST", "/ajax", AjaxRequestHandler.class);
ROUTES.add("POST", "/storage", AjaxRequestHandler.class);
//Kubernetes health check
ROUTES.add("GET", "/healthz", RegistryHealthCheck.class);
ROUTES.setDefaultRequestHandler(DefaultRequestHandler.class);
}
}
代码示例来源:origin: puppetlabs/europa
@Log4j
public class ObjectStoreNotInitialized extends RuntimeException
{
private static final long serialVersionUID = 1L;
public ObjectStoreNotInitialized()
{
}
public ObjectStoreNotInitialized(String message)
{
super(message);
}
public ObjectStoreNotInitialized(String message, Throwable cause)
{
super(message, cause);
}
public ObjectStoreNotInitialized(Throwable cause)
{
super(cause);
}
}
代码示例来源:origin: puppetlabs/europa
@Log4j
public abstract class MonitorTask implements Runnable
{
public MonitorTask()
{
}
public void run()
{
try {
if(log.isDebugEnabled())
log.debug("Starting MonitorTask: "+this);
monitor();
} catch(Throwable ex) {
if ( ! (ex instanceof java.io.InterruptedIOException) ) {
log.error(ex.getMessage(), ex);
}
}
if(log.isDebugEnabled())
log.debug("Finished MonitorTask: "+this);
}
public abstract void monitor() throws Exception;
}
代码示例来源:origin: puppetlabs/europa
@Log4j
@Singleton
public class RegistryDefault extends RegistryBase {
public WebResponse handleRegistryRequest(EuropaRequestContext requestContext) {
throw(new RegistryError("Invalid or unknown name",
RegistryErrorCode.NAME_UNKNOWN));
}
}
代码示例来源:origin: ChanningBJ/meerkat
/**
* Created by chengmingwang on 1/18/17.
*/
@Log4j
public class LogicMeterStatusUpdater extends ScheduledReporter {
public LogicMeterStatusUpdater(MetricRegistry registry) {
super(registry, LogicMeterStatusUpdater.class.getName(), new MetricFilter() {
@Override
public boolean matches(String name, Metric metric) {
return metric instanceof LogicMeter;
}
}, TimeUnit.MINUTES, TimeUnit.MINUTES);
}
@Override
public void report(SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters, SortedMap<String, Histogram> histograms, SortedMap<String, Meter> meters, SortedMap<String, Timer> timers) {
log.debug("LogicMeterStatusUpdater.report start");
for( Gauge gaugesMeter: gauges.values()){
LogicMeter logicMeter = (LogicMeter) gaugesMeter;
logicMeter.refreshStatus();
}
log.debug("LogicMeterStatusUpdater.report end");
}
}
代码示例来源:origin: puppetlabs/europa
@Log4j
public class DockerImageComparator implements Comparator<DockerImage>
{
public DockerImageComparator()
{
}
public int compare(DockerImage i1, DockerImage i2) {
long i1PushTime = getPushTime(i1);
long i2PushTime = getPushTime(i2);
if(i1PushTime > i2PushTime)
return 1;
if(i1PushTime < i2PushTime)
return -1;
return 0;
}
private long getPushTime(DockerImage dockerImage)
{
Long pushTime = dockerImage.getPushTime();
if(pushTime == null)
return 0;
return pushTime.longValue();
}
}
代码示例来源:origin: puppetlabs/europa
@Log4j
@Singleton
public class RegistryManifestDelete extends RegistryBase {
public WebResponse handleRegistryRequest(EuropaRequestContext requestContext) {
WebResponse response = new WebResponse(200);
return response;
}
}
代码示例来源:origin: puppetlabs/europa
@Log4j
@Singleton
public class RegistryLayerDelete extends RegistryBase {
public WebResponse handleRegistryRequest(EuropaRequestContext requestContext) {
WebResponse response = new WebResponse(200);
return response;
}
}
代码示例来源:origin: puppetlabs/europa
@Log4j
@Singleton
public class RegistryVersionCheck extends RegistryBase {
public WebResponse handleRegistryRequest(EuropaRequestContext requestContext) {
WebResponse response = new WebResponse(200);
response.setResponseHeader("Docker-Distribution-API-Version", "registry/2.0");
return response;
}
}
代码示例来源:origin: gnuhpc/Kafka-zk-restapi
@Data
@Log4j
@AllArgsConstructor
public class GeneralResponse {
private GeneralResponseState state;
private String msg;
}
代码示例来源:origin: puppetlabs/europa
@Log4j
@Singleton
public class GetSslSettings extends AjaxHelper<EuropaRequestContext> {
@Inject
private SettingsDb _settingsDb;
public GetSslSettings() {
this.supportedHttpMethods.add(HTTPMethod.GET);
}
public Object get(AjaxRequest ajaxRequest, EuropaRequestContext requestContext) {
return SslSettings.fromEuropaSettings(_settingsDb.listRootSettingsByType(EuropaSettingType.SSL));
}
}
代码示例来源:origin: gnuhpc/Kafka-zk-restapi
@SpringBootApplication
@EnableScheduling
@Log4j
public class KafkaRestSpringbootApplication {
public static void main(String[] args) {
log.info("+++++++++Kafka-zk Rest Application starting++++++++++");
SpringApplication.run(KafkaRestSpringbootApplication.class, args);
}
}
代码示例来源:origin: gnuhpc/Kafka-zk-restapi
@Aspect
@Component
@Log4j
public class ExceptionLogAspect {
@Pointcut("execution(public * org.gnuhpc.bigdata.exception..*.*(..))")
public void exceptionLog() {
}
@Before("exceptionLog()")
public void doBefore(JoinPoint joinPoint) throws Throwable {
// 接收到请求,记录请求内容
log.info("Exception happened!", (Exception) joinPoint.getArgs()[0]);
}
}
代码示例来源:origin: brunocvcunha/instagram4j
/**
* Request for getting a user's friendship status
*
* @author Akhmad Syaikhul Hadi (akhmad.hadi@gmail.com)
*/
@AllArgsConstructor
@Log4j
public class InstagramGetFriendshipRequest extends InstagramGetRequest<InstagramFriendshipStatus> {
private long userId;
@Override
public String getUrl() {
return "friendships/show/" + userId;
}
@Override
@SneakyThrows
public InstagramFriendshipStatus parseResult(int statusCode, String content) {
return this.parseJson(content, InstagramFriendshipStatus.class);
}
}
代码示例来源:origin: puppetlabs/europa
/**
* Pipeline component representing a manual promotion gate
*/
@Log4j
@Data
public class PCManualPromotionGate extends PipelineComponent {
/**
* Always ends pipeline execution
*
* @param promotedImage Ignored
* @return Always an empty Optional
*/
@Override
public Optional<PromotedImage> execute(PromotedImage promotedImage) {
return (Optional.empty());
}
}
代码示例来源:origin: brunocvcunha/instagram4j
/**
* Like Request
*
* @author Bruno Candido Volpato da Cunha
*
*/
@AllArgsConstructor
@Log4j
public class InstagramGetMediaLikersRequest extends InstagramGetRequest<InstagramGetMediaLikersResult> {
private long mediaId;
@Override
public String getUrl() {
return "media/" + mediaId + "/likers/";
}
@Override
@SneakyThrows
public InstagramGetMediaLikersResult parseResult(int statusCode, String content) {
return parseJson(statusCode, content, InstagramGetMediaLikersResult.class);
}
}
代码示例来源:origin: gnuhpc/Kafka-zk-restapi
/**
* Created by gnuhpc on 2017/7/23.
*/
@Getter
@Setter
@Log4j
@ToString
public class AddPartition {
String topic;
int numPartitionsAdded;
String replicaAssignment;
}
内容来源于网络,如有侵权,请联系作者删除!