Sampling interface

Đang mở
#92 4 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
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
backend

Hướng nghiên cứu

Start by reading the logging entry and writer interfaces to see how entries are assembled and passed to the configured writer; the issue does not name specific files or tests. The requested sampling interface would inspect or count fields such as message and level before writing, but the author notes those fields are unavailable separately in the current byte buffer output.

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

Mô tả

Hey, i was wondering if we could code a sampling interface, it would be nice to have an intermediate writter, so i can hash or count things in the log entry before writing it with the configured writer.
Can't access Entry fields directly as they're stored in a byte buffer, can only use e.Value() which returns the raw JSON bytes

edit: oh i see now, that the output is built step by step as a json string, so we can't get a variable like msg, level separately.

Ngôn ngữ chính
Go
Star
881
Fork
64
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 phuslu/log

Tất cả issue của phuslu/log

Issue tương tự

Thêm issue về Go

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.