Skip to content

Commit ed00d63

Browse files
committed
fix(logging[load]): downgrade logger.exception to debug with exc_info
why: logger.exception() dumps tracebacks at ERROR level (visible at default WARNING) alongside tmuxp_echo() user-friendly messages, causing users to see double output. what: - Change plugin load failed from exception to debug with exc_info - Change plugin import failed from exception to debug with exc_info - Change workspace build failed from exception to debug with exc_info
1 parent 50d87de commit ed00d63

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/tmuxp/cli/load.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def load_plugins(
123123
module_name = ".".join(module_name[:-1])
124124
plugin_name = plugin.split(".")[-1]
125125
except AttributeError as error:
126-
logger.exception("plugin load failed")
126+
logger.debug("plugin load failed", exc_info=True)
127127
tmuxp_echo(
128128
colors.error("[Plugin Error]")
129129
+ f" Couldn't load {plugin}\n"
@@ -149,7 +149,7 @@ def load_plugins(
149149
)
150150
sys.exit(1)
151151
except (ImportError, AttributeError) as error:
152-
logger.exception("plugin import failed")
152+
logger.debug("plugin import failed", exc_info=True)
153153
tmuxp_echo(
154154
colors.error("[Plugin Error]")
155155
+ f" Couldn't load {plugin}\n"
@@ -453,7 +453,7 @@ def load_workspace(
453453
_load_attached(builder, detached)
454454

455455
except exc.TmuxpException as e:
456-
logger.exception("workspace build failed")
456+
logger.debug("workspace build failed", exc_info=True)
457457
tmuxp_echo(cli_colors.error("[Error]") + f" {e}")
458458

459459
choice = prompt_choices(

0 commit comments

Comments
 (0)