shlogg · Early preview
Ramu Narasinga @karthik-m22

Why Dedicated Logger Packages Matter In OSS Projects

Changesets CLI package uses a dedicated logger package for consistent logging across the codebase. It imports picocolors to add color encoding to logs, improving feedback from CLI interactions.

Changesets CLI package has an import as shown below at line 3 in packages/cli/src/index.ts#L3

import { error } from "@changesets/logger";

    
    

    
    




I have seen this before, a dedicated package just for logger, in docusaurus-logger. At this point, I believe it is a common standard/best practice across the OSS to have a dedicated package to have a consistent logger to be used across the codebase.

  
  
  Why a dedicated package for logger?

Since changesets is a monorepo (so is Docusaurus), you will find yourself reusing packages across the codebase but imagine a scenario where...