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

Establish a standard logging format through this library, with the ability to customize

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

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
12/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
observability

Hướng nghiên cứu

The payload names the existing dockerflow.logging.MozlogHandler and a proposed generic dockerflow.logging.DefaultHandler, selected by a DOCKERFLOW_LOGGING_FORMAT environment variable. The first step is to read the current logging handlers in the package and see how the Mozlog format is built. The issue leaves the class name ('real name tbd') and the supported format values open, so a contributor would first need a maintainer decision on the design before any code change.

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

Mô tả

Though we want to add the ability to emit logs in the format that's most useful for engineers (see #111), we also want to promote a standard logging format to reduce the cognitive overhead of switching between projects and provide the ability to more-easily search for logs that span multiple services.

The idea would be that instead of encouraging engineers to reference a format-specific class in their logging configuration (e.g. dockerflow.logging.MozlogHandler or google.cloud.logging.handlers.StructuredLogHandler), we can establish a generic class name like:

'console': {
    'class': 'dockerflow.logging.DefaultHandler', #real name tbd
},

with some sort of ability to configure the class through an environment variable, like:

os.getenv("DOCKERFLOW_LOGGING_FORMAT", "MOZLOG")

With this setup, engineers have the freedom to:

  • accept the default format of DefaultHandler as the "current logging format standard of Mozilla".
    • maintainers of this library can change the format of DefaultHandler in accordance with the current logging standard of Mozilla, and if engineers only care about aligning with Mozilla's standard logging format, they'll automatically be compliant with the standard when they update this library
  • override the standard format to another commonly used format through environment configuration, like
export DOCKERFLOW_LOGGING_FORMAT=GCP
  • still (of course) have the ability to fully customize their logging setup by referencing specific logging handlers, formatters, and filters
Ngôn ngữ chính
Python
Star
41
Fork
21
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 mozilla-services/python-dockerflow

Tất cả issue của mozilla-services/python-dockerflow

Issue tương tự

Thêm issue về Python

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.