mirror of https://github.com/grpc/grpc-java.git
services: fix lint on toString (#4481)
BinlogHelper does not override toString so print something else that is more descriptive.
This commit is contained in:
parent
850249f9ca
commit
ad370d807b
|
|
@ -404,27 +404,33 @@ final class BinlogHelper {
|
||||||
}
|
}
|
||||||
if (methodOrSvc.equals("*")) {
|
if (methodOrSvc.equals("*")) {
|
||||||
if (globalLog != null) {
|
if (globalLog != null) {
|
||||||
logger.log(Level.SEVERE, "Ignoring duplicate entry: " + configuration);
|
logger.log(Level.SEVERE, "Ignoring duplicate entry: {0}", configuration);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
globalLog = binLog;
|
globalLog = binLog;
|
||||||
logger.info("Global binlog: " + globalLog);
|
logger.log(Level.INFO, "Global binlog: {0}", binlogOptionStr);
|
||||||
} else if (isServiceGlob(methodOrSvc)) {
|
} else if (isServiceGlob(methodOrSvc)) {
|
||||||
String service = MethodDescriptor.extractFullServiceName(methodOrSvc);
|
String service = MethodDescriptor.extractFullServiceName(methodOrSvc);
|
||||||
if (perServiceLogs.containsKey(service)) {
|
if (perServiceLogs.containsKey(service)) {
|
||||||
logger.log(Level.SEVERE, "Ignoring duplicate entry: " + configuration);
|
logger.log(Level.SEVERE, "Ignoring duplicate entry: {0}", configuration);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
perServiceLogs.put(service, binLog);
|
perServiceLogs.put(service, binLog);
|
||||||
logger.info(String.format("Service binlog: service=%s log=%s", service, binLog));
|
logger.log(
|
||||||
|
Level.INFO,
|
||||||
|
"Service binlog: service={0} config={1}",
|
||||||
|
new Object[] {service, binlogOptionStr});
|
||||||
} else {
|
} else {
|
||||||
// assume fully qualified method name
|
// assume fully qualified method name
|
||||||
if (perMethodLogs.containsKey(methodOrSvc)) {
|
if (perMethodLogs.containsKey(methodOrSvc)) {
|
||||||
logger.log(Level.SEVERE, "Ignoring duplicate entry: " + configuration);
|
logger.log(Level.SEVERE, "Ignoring duplicate entry: {0}", configuration);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
perMethodLogs.put(methodOrSvc, binLog);
|
perMethodLogs.put(methodOrSvc, binLog);
|
||||||
logger.info(String.format("Method binlog: method=%s log=%s", methodOrSvc, binLog));
|
logger.log(
|
||||||
|
Level.INFO,
|
||||||
|
"Method binlog: method={0} config={1}",
|
||||||
|
new Object[] {methodOrSvc, binlogOptionStr});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue