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

why output "provide either a message or block" if message is nil?

Đang mở
#43 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
observability-sre

Hướng nghiên cứu

Tìm kiếm trong repository thông báo chính xác "provide either a message or block" và kiểm tra cách logger.info path xử lý một nil message. Issue không nêu file hay test nào; để hoàn tất, cần thống nhất hành vi đối với nil messages và có một chẩn đoán xác định gem nếu lời gọi vẫn không hợp lệ.

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

Mô tả

Was tracking down some mystery "DEBUG -- : provide either a message or block" messages in my logs.

Finally found one reference to it, in another issue here for logdna.

It's a terribly unhelpful message, as it gives zero indication of what gem is outputting it... please MENTION your gem name in such messages.

But more to the point, what is wrong with a nil message?

It seems to me that this code:

logger.info
logger.info
logger.info "NOTICE ME!"
logger.info
logger.info

is legitimate and should output 5 INFO lines to the log, 4 without a text message, NOT 4 cryptic "DEBUG" lines saying "provide either a message or block" messages

I'm not sure where in your code it is, but here's your code that IMO ought be removed, or at least mention the source of the message eg the "logdna gem"

if message.nil?
    @internal_logger.debug("provide either a message or block")
    return
  end
Ngôn ngữ chính
Ruby
Star
19
Fork
18
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 logdna/ruby

Tất cả issue của logdna/ruby

Issue tương tự

Thêm issue về Ruby

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.