Skip to content

[RFC] 3.0 Updates - Friendly Console #964

@crazywhalecc

Description

@crazywhalecc

[RFC] 3.0 Updates - Friendly Console

The console output and logger is one of the most important components for SPC tool. But currently we have very green output and many redundant terminal shell outputs.

In 3.0, it will be refactored in several ways:

  • Deprecate --debug command, use symfony's original -v and -vv for outputs. (For backward compatibility, it will be equal to -vvv for the first major version of SPC)
  • Separate outputs for 4 levels:
    • Normal interactive mode: Which only shows ⚙️ Build configuration: the necessary info for current status with some progress bar.
    • -v mode: It shows build time and INFO level like current version, but with colored `[TIME INFO]
    • -vv mode: It shows all level of PSR logs, but without execution output.
    • -vvv mode: It shows all level of PSR logs, and output all console output for executed commands.

When using -v mode, the interactive message will be shown as INFO level, and the progress indicator will be disabled.

Example of normal mode displays:

⚙️ Build Configuration:
    OS: Darwin (arm64)
    ...

▶ Downloading artifacts... (90.2s)
▶ Extracting sources... (3.2s)
▶ Building libraries...
  ✓ libiconv (21.5s)
  ✓ zlib (1.1s) // finished status
  • libxml2 ... (6.6s) // wip status
▶ Configuring PHP... (22.0s)
▶ Compiling PHP... (20.3s)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ BUILD SUCCESSFUL (80.2s)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

▶ php-cli binary: /path/to/buildroot/bin/php
▶ License: /path/to/buildroot/license

If you have any question or have better suggestions, please leave comment here with quote.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRequest for comments

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions