fix: correct and standardize tabcmd 2 output messages to match tabcmd 1#432
Open
jacalata wants to merge 6 commits into
Open
fix: correct and standardize tabcmd 2 output messages to match tabcmd 1#432jacalata wants to merge 6 commits into
jacalata wants to merge 6 commits into
Conversation
…esiteusers, removeusers - listsites: show site content_url instead of internal UUID for SITEID - deletegroup: log group name instead of UUID in delete status message - export/save_to_file: pass filename as content name to fix double-space in "Saved to '...'" message - createsiteusers: append str(e) to error_list instead of e.__class__.__name__ so error details show readable messages - removeusers: use new tabcmd.removeusers.group string key that includes the group name in the status message Fixes #429 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ebug noise - logger_config.py: add ===== prefix to INFO format so all action lines match tabcmd 1 style in one place - session.py: remove hardcoded ===== from _print_server_info lines (now added by formatter); demote "Fetched user details from server" to debug - constants.py: demote tabcmd.debug.error_message log call from info to debug so it no longer appears in normal output - delete_command.py: default content_type to "workbook" in status message to fix double-space when type is undetected - tabcmd_messages_en.properties: remove hardcoded ===== from tabcmd.listing.header (would double-prefix with formatter) Closes remaining items from #429 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Avoids the ===== prefix being applied to the version/help display. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Plain output is the default. Set TABCMD_CLASSIC_OUTPUT=true (or 1/yes) to restore the ===== prefix on all INFO-level messages for backward compatibility with tabcmd 1 output style. Also moves the version banner in tabcmd_controller to print() so it is never prefixed regardless of mode. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The condition compared logging_level string 'INFO' to the integer logging.INFO (20), which was always True, causing the print to fire on every invocation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
session.login string already existed; add logger.info call at the start of _sign_in() to surface it as a distinct step after connecting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
@jacalata looks good - my only question, do we need |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TABCMD_CLASSIC_OUTPUT=trueenv var to opt in to=====prefix on all INFO lines (off by default, matching tabcmd 2's clean style)logging: INFOline printed before every commandsite.idUUID vssite.content_url) inlistsitesoutputgroup_idUUID vsargs.name) indeletegroupstatus messagecreatesiteuserserror listremoveusers.servervs newremoveusers.group) inremoveuserscommandDetails
The
=====prefix approach uses a single change inlogger_config.py(the logging formatter) rather than touching every locale string. WhenTABCMD_CLASSIC_OUTPUTis not set, INFO output is clean plain text; when set, every INFO line gets the=====prefix that tabcmd 1 used.The
logging: INFObug was a type mismatch:namespace.logging_levelis a string"INFO"but the code compared it againstlogging.INFO(integer20), so the condition was always true.Closes items 1–9 in #429 (item #10, logout redirect, is not applicable with PAT auth).
Test plan
pytest tests/)tabcmd login/tabcmd logoutproduce clean output without=====prefixTABCMD_CLASSIC_OUTPUT=true tabcmd loginproduces=====-prefixed INFO linestabcmd listsitesshows human-readable SITEID (not UUID)logging: INFOline appears before command output🤖 Generated with Claude Code