com.aliyun.oss.shade.io.opentelemetry.api.logs.DefaultLogger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-sdk-oss-shade Show documentation
Show all versions of aliyun-sdk-oss-shade Show documentation
The Aliyun OSS SDK for Java used for accessing Aliyun Object Storage Service, includes all service and dependent JARs.
The newest version!
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.logs;
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.context.Context;
import java.time.Instant;
import java.util.concurrent.TimeUnit;
class DefaultLogger implements Logger {
private static final Logger INSTANCE = new DefaultLogger();
private static final LogRecordBuilder NOOP_LOG_RECORD_BUILDER = new NoopLogRecordBuilder();
private DefaultLogger() {}
static Logger getInstance() {
return INSTANCE;
}
@Override
public LogRecordBuilder logRecordBuilder() {
return NOOP_LOG_RECORD_BUILDER;
}
private static final class NoopLogRecordBuilder implements LogRecordBuilder {
private NoopLogRecordBuilder() {}
@Override
public LogRecordBuilder setTimestamp(long timestamp, TimeUnit unit) {
return this;
}
@Override
public LogRecordBuilder setTimestamp(Instant instant) {
return this;
}
@Override
public LogRecordBuilder setObservedTimestamp(long timestamp, TimeUnit unit) {
return this;
}
@Override
public LogRecordBuilder setObservedTimestamp(Instant instant) {
return this;
}
@Override
public LogRecordBuilder setContext(Context context) {
return this;
}
@Override
public LogRecordBuilder setSeverity(Severity severity) {
return this;
}
@Override
public LogRecordBuilder setSeverityText(String severityText) {
return this;
}
@Override
public LogRecordBuilder setBody(String body) {
return this;
}
@Override
public LogRecordBuilder setAttribute(AttributeKey key, T value) {
return this;
}
@Override
public void emit() {}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy