Package io.grpc.internal
Class ChannelLoggerImpl
- java.lang.Object
-
- io.grpc.ChannelLogger
-
- io.grpc.internal.ChannelLoggerImpl
-
final class ChannelLoggerImpl extends ChannelLogger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.grpc.ChannelLogger
ChannelLogger.ChannelLogLevel
-
-
Field Summary
Fields Modifier and Type Field Description private TimeProvider
time
private ChannelTracer
tracer
-
Constructor Summary
Constructors Constructor Description ChannelLoggerImpl(ChannelTracer tracer, TimeProvider time)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
isTraceable(ChannelLogger.ChannelLogLevel level)
void
log(ChannelLogger.ChannelLogLevel level, java.lang.String msg)
Logs a message.void
log(ChannelLogger.ChannelLogLevel level, java.lang.String messageFormat, java.lang.Object... args)
Logs a message, using a message format and a list of arguments used to generate the log message withMessageFormat
.(package private) static void
logOnly(InternalLogId logId, ChannelLogger.ChannelLogLevel level, java.lang.String msg)
(package private) static void
logOnly(InternalLogId logId, ChannelLogger.ChannelLogLevel level, java.lang.String messageFormat, java.lang.Object... args)
private static java.util.logging.Level
toJavaLogLevel(ChannelLogger.ChannelLogLevel level)
private static InternalChannelz.ChannelTrace.Event.Severity
toTracerSeverity(ChannelLogger.ChannelLogLevel level)
private void
trace(ChannelLogger.ChannelLogLevel level, java.lang.String msg)
-
-
-
Field Detail
-
tracer
private final ChannelTracer tracer
-
time
private final TimeProvider time
-
-
Constructor Detail
-
ChannelLoggerImpl
ChannelLoggerImpl(ChannelTracer tracer, TimeProvider time)
-
-
Method Detail
-
log
public void log(ChannelLogger.ChannelLogLevel level, java.lang.String msg)
Description copied from class:ChannelLogger
Logs a message.- Specified by:
log
in classChannelLogger
-
log
public void log(ChannelLogger.ChannelLogLevel level, java.lang.String messageFormat, java.lang.Object... args)
Description copied from class:ChannelLogger
Logs a message, using a message format and a list of arguments used to generate the log message withMessageFormat
.- Specified by:
log
in classChannelLogger
-
logOnly
static void logOnly(InternalLogId logId, ChannelLogger.ChannelLogLevel level, java.lang.String msg)
-
logOnly
static void logOnly(InternalLogId logId, ChannelLogger.ChannelLogLevel level, java.lang.String messageFormat, java.lang.Object... args)
-
isTraceable
private boolean isTraceable(ChannelLogger.ChannelLogLevel level)
-
trace
private void trace(ChannelLogger.ChannelLogLevel level, java.lang.String msg)
-
toTracerSeverity
private static InternalChannelz.ChannelTrace.Event.Severity toTracerSeverity(ChannelLogger.ChannelLogLevel level)
-
toJavaLogLevel
private static java.util.logging.Level toJavaLogLevel(ChannelLogger.ChannelLogLevel level)
-
-