How to approach adding logging timestamps
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ệ
- ruby
- Lĩnh vực
- build-system, cli
Hướng nghiên cứu
Bắt đầu bằng việc xem xét cách xử lý đầu ra trên toàn bộ codebase của Rake và các Rakefiles, đặc biệt là việc sử dụng trực tiếp Kernel.puts và cách tiếp cận wrapping STDOUT/STDERR được đề xuất. Xác định liệu một tính năng timestamp opt-in có thể duy trì hành vi của thư viện hay không; được xem là hoàn tất khi một thiết kế khả thi và phạm vi rõ ràng đã được thống nhất trước khi triển khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello,
our customer would like to have optional timestamps for rake output and I would like to contribute this feature if this is feasible. I did some research and it looks like both Rake codebase and Rakefiles use "Kernel.puts" directly. So I have two ideas I would like to discuss before I do any coding:
-
Hacky approach: create STDOUT/STDERR wrappers and change
$stdoutand$stderrglobal variables to these instances. They would add timestamps when configured. Pros: Safe for the future changes because nothing is changing in the codebase. Cons: When Rake is used as a library, changing standard output and error would introduce regressions and problems after upgrade. -
Clean but disturbing approach: search and replace
putsin the codebase and create a DSL methodputsfor use in Rakefiles. This looks cleaner, but developers are already used toputsin the codebase. Everytime new line withputsis added, the output will appear in the output without timestamp. Since this feature would be opt-in, devs will start adding these types kinds of errors pretty soon.
Honestly, I am not sure if I can deliver this feature to my customer but let's discuss and see what you guys think about this. Cheers!
- Ngôn ngữ chính
- Ruby
- Star
- 2.5k
- Fork
- 650
- Merge trung bình
- 6 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ruby/rake
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
palladius/rails8-app-on-gcp#145 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
rubocop/rubocop-rspec#2236 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
riscv/riscv-unified-db#2624 · 1 reaction ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100