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

io_debug: Extra option for only logging on failure

Đang mở
#776 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
25/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ệ
go
Lĩnh vực
backend, observability

Hướng nghiên cứu

Bắt đầu bằng cách truy vết cách xử lý cấu hình io_debug hiện có và luồng ghi log giao tiếp SMTP; issue không cung cấp điểm bắt đầu cho file hoặc test. Xác nhận cách nhận diện các kết quả thành công và lỗi, sau đó xác định các test bao quát hành vi off, on và on_failure để tùy chọn mới chỉ ghi log toàn bộ giao tiếp đối với các tương tác thất bại.

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

Mô tả

new feature

Use case

io_debug is currently a boolean flag.

Turning it on to log everything when debugging either Maddy's sources or on bringing up a new server makes sense. However, it would also be useful for longer-term debugging of more complex issues with server setup if it could log the entire communication only when an error has occurred. Thus successful connections do not need the extra info, whilst problem communication can capture this for days or weeks without needing to generate overly verbose logs.

There is also the possibility that extended logging on failure/rejections/etc. could be valuable for feeding into systems like fail2ban or CrowdSec for blacklisting spam and attackers, enabling such systems to differentiate better between malicious connections and innnocent failures.

Your idea for a solution

How your solution would work in general?
I haven;t yet looked to see how difficult this would be in terms of implementation. But for the interface, simply adding a third option to the config directive - "on", "off", and e.g. "on_failure" seems suitable to me.

  • I'm willing to help with the implementation
    • I think I can implement but would appreciate guidance and a review of changes to ensure it's implemented in the required places.
Ngôn ngữ chính
Go
Star
6.1k
Fork
327
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 foxcpp/maddy

Tất cả issue của foxcpp/maddy

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.