Skip to content

Conversation

Demolus13
Copy link
Member

@Demolus13 Demolus13 commented Aug 25, 2025

Summary

Refactor console logging to provide a clearer, more user‑friendly command output with an optional Rich UI output, while keeping detailed logs. Adds a flag to disable Rich output for default plain text UI.

Description of changes

  • Introduces a Rich-based logging handler and integrated it into the macaron commands so users see concise, structured progress and results in the terminal.
  • Adds a new CLI flag --disable-rich-output to fall back to standard logging formats.
  • Improves consistency of log message formatting and argument handling across modules through verbose mode.
  • Using Rich Handler to provide a custom logger with rich output to python logging.
  • Providing various functions and API calls to update the contents shown on running macaron commands.
  • Creating AccessHandler to set logger with verbosity and get logger.
  • No functional behaviour changes to analysis/policy evaluation

Modified files

  • src/macaron/__main__.py: core logging setup, CLI flag, command dispatch hooks into Rich handler.
  • src/macaron/console.py: adds/accesses the Rich logging handler module.
  • src/macaron/slsa_analyzer/analyzer.py: logging refinements for analyze command.
  • src/macaron/policy_engine/policy_engine.py: logging refinements for verify-policy command.
  • src/macaron/repo_finder/repo_finder.py: logging refinements for find-source command.
  • src/macaron/config/defaults.py: logging refinements for dump-defaults command.
  • src/macaron/output_reporter/reporter.py: small logging/formatting tweaks.
  • src/macaron/policy_engine/results.py: small logging/formatting tweaks.
  • src/macaron/repo_finder/repo_utils.py: small logging/formatting tweaks.
  • src/macaron/policy_engine/base_check.py: log formatting consistency.
  • src/macaron/policy_engine/registry.py: log formatting consistency.

Related issues

  • Command Line Interface #211

Checklist

  • I have reviewed the contribution guide.
  • My PR title and commits follow the Conventional Commits convention.
  • My commits include the "Signed-off-by" line.
  • I have signed my commits following the instructions provided by GitHub. Note that we run GitHub's commit verification tool to check the commit signatures. A green verified label should appear next to all of your commits on GitHub.
  • I have updated the relevant documentation, if applicable.
  • I have tested my changes and verified they work as expected.

Copy link

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Aug 25, 2025
@Demolus13 Demolus13 force-pushed the pgovale/ui-enhancements branch 2 times, most recently from 3d7155e to 408075b Compare August 26, 2025 10:27
@oracle-contributor-agreement oracle-contributor-agreement bot added OCA Verified All contributors have signed the Oracle Contributor Agreement. and removed OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. labels Aug 26, 2025
@Demolus13 Demolus13 force-pushed the pgovale/ui-enhancements branch from 185bc5d to 3b04952 Compare September 16, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant