Removing redudancy in device mapping logging
PiperOrigin-RevId: 312529744 Change-Id: I73cce5429a0f5d351a8acdcd54c00e11a1f0d1ea
This commit is contained in:
parent
0642f8155f
commit
236b503131
@ -349,12 +349,12 @@ DirectSession::DirectSession(const SessionOptions& options,
|
|||||||
int devices_added = 0;
|
int devices_added = 0;
|
||||||
if (options.config.log_device_placement()) {
|
if (options.config.log_device_placement()) {
|
||||||
const string mapping_str = device_mgr_->DeviceMappingString();
|
const string mapping_str = device_mgr_->DeviceMappingString();
|
||||||
|
string msg;
|
||||||
if (mapping_str.empty()) {
|
if (mapping_str.empty()) {
|
||||||
printf("Device mapping: no known devices.\n");
|
msg = "Device mapping: no known devices.";
|
||||||
} else {
|
} else {
|
||||||
printf("Device mapping:\n%s", mapping_str.c_str());
|
msg = strings::StrCat("Device mapping:\n", mapping_str);
|
||||||
}
|
}
|
||||||
string msg = strings::StrCat("Device mapping:\n", mapping_str);
|
|
||||||
if (!logging::LogToListeners(msg)) {
|
if (!logging::LogToListeners(msg)) {
|
||||||
LOG(INFO) << msg;
|
LOG(INFO) << msg;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user