i'm dumb, and i was wondering why the LOGGER was not printing messages...

This commit is contained in:
cschen 2025-02-18 21:17:13 +01:00
parent 0a25a5f7c1
commit 6f6c912bf0

View file

@ -63,7 +63,7 @@ class CodempJoinBufferCommand(sublime_plugin.WindowCommand):
buff_ctl = ctl_promise.wait() buff_ctl = ctl_promise.wait()
logger.debug("attach successfull!") logger.debug("attach successfull!")
except Exception as e: except Exception as e:
logging.error(f"error when attaching to buffer '{id}':\n\n {e}") logger.error(f"error when attaching to buffer '{id}':\n\n {e}")
sublime.error_message(f"Could not attach to buffer '{buffer_id}'") sublime.error_message(f"Could not attach to buffer '{buffer_id}'")
return return
@ -94,11 +94,11 @@ class CodempLeaveBufferCommand(sublime_plugin.WindowCommand):
vws = buffers.lookupParent(buff) vws = buffers.lookupParent(buff)
except KeyError: except KeyError:
sublime.error_message(f"You are not attached to the buffer '{buffer_id}'") sublime.error_message(f"You are not attached to the buffer '{buffer_id}'")
logging.warning(f"You are not attached to the buffer '{buffer_id}'") logger.warning(f"You are not attached to the buffer '{buffer_id}'")
return return
if not vws.handle.get_buffer(buffer_id): if not vws.handle.get_buffer(buffer_id):
logging.error("The desired buffer is not managed by the workspace.") logger.error("The desired buffer is not managed by the workspace.")
return return
# The call must happen separately, otherwise it causes sublime to crash... # The call must happen separately, otherwise it causes sublime to crash...
@ -120,11 +120,11 @@ class CodempCreateBufferCommand(sublime_plugin.WindowCommand):
try: vws = workspaces.lookupId(workspace_id) try: vws = workspaces.lookupId(workspace_id)
except KeyError: except KeyError:
sublime.error_message(f"You are not attached to the workspace '{workspace_id}'") sublime.error_message(f"You are not attached to the workspace '{workspace_id}'")
logging.warning(f"You are not attached to the workspace '{workspace_id}'") logger.warning(f"You are not attached to the workspace '{workspace_id}'")
return return
vws.handle.create_buffer(buffer_id) vws.handle.create_buffer(buffer_id)
logging.info( logger.info(
"created buffer '{buffer_id}' in the workspace '{workspace_id}'.\n\ "created buffer '{buffer_id}' in the workspace '{workspace_id}'.\n\
To interact with it you need to attach to it with Codemp: Attach." To interact with it you need to attach to it with Codemp: Attach."
) )
@ -138,7 +138,7 @@ class CodempDeleteBufferCommand(sublime_plugin.WindowCommand):
try: vws = workspaces.lookupId(workspace_id) try: vws = workspaces.lookupId(workspace_id)
except KeyError: except KeyError:
sublime.error_message(f"You are not attached to the workspace '{workspace_id}'") sublime.error_message(f"You are not attached to the workspace '{workspace_id}'")
logging.warning(f"You are not attached to the workspace '{workspace_id}'") logger.warning(f"You are not attached to the workspace '{workspace_id}'")
return return
if buffer_id in buffers: if buffer_id in buffers: