EngineeringSenior DeveloperTraining Sessions

Session 14 - Logging, Tracing & Debugging Like a Pro

Premium

"Thêm log đi" - câu nói phổ biến khi debug. Nhưng log GÌ, ở ĐÂU, chi tiết bao nhiêu? Log quá nhiều = noise. Log quá ít = mù. Session này giúp bạn log ĐÚNG.


Mục tiêu

  • Structured Logging vs String Logging - tại sao khác biệt
  • Log Levels - khi nào dùng level nào
  • Correlation - trace request qua nhiều services
  • Khi nào log, khi nào KHÔNG log

1) Structured Logging - Tại Sao Quan Trọng

csharp
// ❌ String logging: con người đọc OK, máy KHÔNG search được
logger.LogInformation($"Order {orderId} created by {userId} with total {total}");
Premium

Continue with premium access

Session 14 - Logging, Tracing & Debugging Like a Pro is part of the premium library. Sign in with a premium account to unlock the full lesson and the rest of this track.

01 Full premium lesson access
02 Deeper implementation notes
03 Ongoing content updates