Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/src/main/java/io/grpc/ChannelLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public abstract class ChannelLogger {
* | ChannelLogger Level | Channelz Severity | Java Logger Level |
* +---------------------+-------------------+-------------------+
* | DEBUG | N/A | FINEST |
* | INFO | CT_INFO | FINEST |
* | WARNING | CT_WARNING | FINER |
* | INFO | CT_INFO | FINER |
* | WARNING | CT_WARNING | FINE |
* | ERROR | CT_ERROR | FINE |
* +---------------------+-------------------+-------------------+
* </pre>
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/io/grpc/internal/ChannelLoggerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ private static Severity toTracerSeverity(ChannelLogLevel level) {
private static Level toJavaLogLevel(ChannelLogLevel level) {
switch (level) {
case ERROR:
return Level.FINE;
case WARNING:
return Level.FINE;
case INFO:
return Level.FINER;
default:
return Level.FINEST;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void logging() {
.setTimestampNanos(200)
.build();
assertThat(stats.channelTrace.events).containsExactly(event);
assertThat(logs).contains("FINER: " + logPrefix + "Warning message");
assertThat(logs).contains("FINE: " + logPrefix + "Warning message");

clock.forwardNanos(100);
logger.log(ChannelLogLevel.INFO, "Info message");
Expand All @@ -112,7 +112,7 @@ public void logging() {
.setTimestampNanos(300)
.build();
assertThat(stats.channelTrace.events).containsExactly(event);
assertThat(logs).contains("FINEST: " + logPrefix + "Info message");
assertThat(logs).contains("FINER: " + logPrefix + "Info message");

clock.forwardNanos(100);
logger.log(ChannelLogLevel.DEBUG, "Debug message");
Expand Down Expand Up @@ -154,7 +154,7 @@ public void formatLogging() {
.setTimestampNanos(200)
.build();
assertThat(stats.channelTrace.events).containsExactly(event);
assertThat(logs).contains("FINER: " + logPrefix + "Warning message foo, bar");
assertThat(logs).contains("FINE: " + logPrefix + "Warning message foo, bar");

clock.forwardNanos(100);
logger.log(ChannelLogLevel.INFO, "Info message {0}", "bar");
Expand All @@ -166,7 +166,7 @@ public void formatLogging() {
.setTimestampNanos(300)
.build();
assertThat(stats.channelTrace.events).containsExactly(event);
assertThat(logs).contains("FINEST: " + logPrefix + "Info message bar");
assertThat(logs).contains("FINER: " + logPrefix + "Info message bar");

clock.forwardNanos(100);
logger.log(ChannelLogLevel.DEBUG, "Debug message {0}", "foo");
Expand Down