Skip to content

Commit 27f39ba

Browse files
committed
Fix connection errors logging
1 parent 27a1997 commit 27f39ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/midiexplorer/gui/helpers/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def log_warning(message: str):
218218

219219
@staticmethod
220220
def log_error(message: str):
221-
Logger.log(message, LoggingLevel.DEBUG)
221+
Logger.log(message, LoggingLevel.ERROR)
222222

223223
@staticmethod
224224
def log_critical(message: str):

src/midiexplorer/gui/windows/conn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def _install_input_callback(in_port: MidiInPort, dest: MidiOutPort | str):
4141
except OSError as e:
4242
# i.e.: OSError: unknown port 'iRig PRO I/O MIDI IN 0'
4343
# TODO: popup?
44-
logger.log_error(e)
44+
logger.log_error(e.strerror)
4545
if dpg.get_value('input_mode') == 'Callback':
4646
in_port.callback()
4747
logger.log_info(f"Attached MIDI receive callback to {in_port.name}!")
@@ -212,7 +212,7 @@ def link_node_callback(sender: int | str,
212212
except OSError as e:
213213
# i.e.: OSError: unknown port 'iRig PRO I/O MIDI IN 0'
214214
# TODO: popup?
215-
logger.log_error(e)
215+
logger.log_error(e.strerror)
216216
_install_input_callback(pin1_user_data, pin2)
217217
_link_nodes(pin1, pin2, sender)
218218
elif isinstance(pin1_user_data, MidiInPort):
@@ -228,7 +228,7 @@ def link_node_callback(sender: int | str,
228228
except OSError as e:
229229
# i.e.: OSError: unknown port 'iRig PRO I/O MIDI IN 0'
230230
# TODO: popup?
231-
logger.log_error(e)
231+
logger.log_error(e.strerror)
232232
module_pin = pin1
233233
module_target = pin2_user_data
234234
else:

0 commit comments

Comments
 (0)