Skip to content

Conversation

@willeastcott
Copy link
Contributor

@willeastcott willeastcott commented Nov 5, 2025

Adds -q (or --quiet) mode.

Fixes #91

@willeastcott willeastcott self-assigned this Nov 5, 2025
@willeastcott willeastcott added the enhancement New feature or request label Nov 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a centralized logging system to replace direct console.log, console.warn, console.error, and stdout.write calls throughout the codebase, enabling a quiet mode feature via a new --quiet / -q CLI flag.

  • Adds a new Logger class with methods for different log levels (info, warn, error, debug, progress)
  • Replaces all console.* calls and stdout.write with the new logger methods
  • Adds quiet mode support via CLI flag that suppresses all output except errors

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/logger.ts New logger utility with support for silent/normal modes
src/types.ts Adds quiet boolean to Options type
src/index.ts Integrates logger, adds quiet flag to CLI, replaces console calls
src/writers/write-sog.ts Replaces console.log with logger.info
src/writers/write-lod.ts Replaces console.log/warn with logger.info/warn
src/utils/k-means.ts Replaces console.log and stdout.write with logger methods
src/ordering.ts Replaces console.log with logger.debug
src/gpu/gpu-device.ts Replaces console.log with logger.debug, removes unused import
eslint.config.mjs Disables JSDoc type requirement rules
README.md Documents new --quiet CLI flag
Comments suppressed due to low confidence (1)

src/gpu/gpu-device.ts:3

  • [nitpick] Extra blank line at line 3 should be removed for consistency with the rest of the codebase.
// import { JSDOM } from 'jsdom';

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@slimbuck
Copy link
Member

slimbuck commented Nov 6, 2025

Yaay thank you!

@slimbuck slimbuck merged commit 91600a6 into main Nov 6, 2025
2 checks passed
@slimbuck slimbuck deleted the quiet-mode branch November 6, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add output verbosity option

3 participants