Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Make the logger replaceable

Aperta
#1,568 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, node.js, typescript
Ambito
tooling

Direzione di ricerca

Start with packages/testcontainers/src/common/logger.ts and inspect the exported logger instances and their call sites for container, build, pull, and exec output. Check how the current debug logger handles DEBUG and NODE_ENV=test, and review the package exports because log is public API. Done means a replaceable logger supports the requested levels while the default preserves existing namespace controls and output separation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement minor

What happens

All logging goes through the debug package, under six namespaces (testcontainers, testcontainers:containers, :compose, :build, :pull, :exec). The only control is the DEBUG environment variable.

  • Logs cannot be sent to the application's logger or to a test reporter.
  • The level cannot be set from code.
  • Nothing is shown by default, so the first pull of a large image looks like a hang.
  • When NODE_ENV is test, the logger switches its output from stderr to console.log.

Expected

  • A logger interface that can be replaced: setLogger({ debug, info, warn, error }).
  • The debug-based logger stays the default, so DEBUG=testcontainers* keeps working.
  • Container, build, pull and exec output remain separable.

Where

packages/testcontainers/src/common/logger.ts and its exported instances.

Notes

  • Go has log.SetDefault(logger). Java logs through SLF4J, so the application chooses the backend.
  • log is exported from the package today, so its shape is public API.

Dependencies

  • Nothing blocks this. It can start now.
Lingua principale
TypeScript
Stelle
2.6k
Fork
274
Merge medio
1g 14h
PR unite (30g)
44

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di testcontainers/testcontainers-node

Tutte le issue di testcontainers/testcontainers-node

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.