Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Make the logger replaceable

Đang mở
#1,568 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, node.js, typescript
Lĩnh vực
tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
2.6k
Fork
274
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
44

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của testcontainers/testcontainers-node

Tất cả issue của testcontainers/testcontainers-node

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.