@@ -487,7 +487,7 @@ void DeviceBase::close() {
487487void DeviceBase::closeImpl () {
488488 using namespace std ::chrono;
489489 auto t1 = steady_clock::now ();
490- pimpl->logger .debug (" Device about to be closed..." );
490+ pimpl->logger .warn (" Device mxid({}) about to be closed..." , deviceInfo. getMxId () );
491491
492492 // Close connection first; causes Xlink internal calls to unblock semaphore waits and
493493 // return error codes, which then allows queues to unblock
@@ -513,7 +513,7 @@ void DeviceBase::closeImpl() {
513513 // At the end stop the monitor thread
514514 if (monitorThread.joinable ()) monitorThread.join ();
515515
516- pimpl->logger .debug (" Device closed, {}" , duration_cast<milliseconds>(steady_clock::now () - t1).count ());
516+ pimpl->logger .warn (" Device mxid({}) closed, {}" , deviceInfo. getMxId () , duration_cast<milliseconds>(steady_clock::now () - t1).count ());
517517}
518518
519519// This function is thread-unsafe. The idea of "isClosed" is ephemerial and
@@ -608,7 +608,7 @@ void DeviceBase::init2(Config cfg, const dai::Path& pathToMvcmd, tl::optional<co
608608 pimpl->logger .debug (" Found an actual device by given DeviceInfo: {}" , deviceInfo.toString ());
609609 } else {
610610 deviceInfo.state = X_LINK_ANY_STATE;
611- pimpl->logger .debug (" Searched, but no actual device found by given DeviceInfo" );
611+ pimpl->logger .warn (" Searched, but no actual device found by given DeviceInfo" );
612612 }
613613 }
614614
@@ -693,14 +693,14 @@ void DeviceBase::init2(Config cfg, const dai::Path& pathToMvcmd, tl::optional<co
693693 auto t1 = steady_clock::now ();
694694 bl.bootMemory (fwWithConfig);
695695 auto t2 = steady_clock::now ();
696- pimpl->logger .debug (" Booting FW with Bootloader. Version {}, Time taken: {}" , version.toString (), duration_cast<milliseconds>(t2 - t1));
696+ pimpl->logger .warn (" Booting FW with Bootloader. Version {}, Time taken: {}" , version.toString (), duration_cast<milliseconds>(t2 - t1));
697697
698698 // After that the state will be expectedBootState
699699 deviceInfo.state = expectedBootState;
700700 } else {
701701 // Boot into USB ROM BOOTLOADER
702702 bl.bootUsbRomBootloader ();
703- pimpl->logger .debug (" Booting FW by jumping to USB ROM Bootloader first. Bootloader Version {}" , version.toString ());
703+ pimpl->logger .warn (" Booting FW by jumping to USB ROM Bootloader first. Bootloader Version {}" , version.toString ());
704704
705705 // After that the state will be UNBOOTED
706706 deviceInfo.state = X_LINK_UNBOOTED;
@@ -742,7 +742,7 @@ void DeviceBase::init2(Config cfg, const dai::Path& pathToMvcmd, tl::optional<co
742742 return rpcStream->read ();
743743 } catch (const std::exception& e) {
744744 // If any exception is thrown, log it and rethrow
745- implLogger.debug (" RPC error: {}" , e.what ());
745+ implLogger.warn (" RPC mxid({}) error: {}" , rpcStream-> getMxId () , e.what ());
746746 throw std::system_error (std::make_error_code (std::errc::io_error), " Device already closed or disconnected" );
747747 }
748748 });
0 commit comments