تعریف موقعیت استفاده از لاگ لولهای مختلف در برنامه
Trace - Only when I would be "tracing" the code and trying to find one part of a function specifically.
Debug - Information that is diagnostically helpful to people more than just developers (IT, sysadmins, etc.).
Info - Generally useful information to log (service start/stop, configuration assumptions, etc). Info I want to always have available but usually don't care about under normal circumstances. This is my out-of-the-box config level.
Warn - Anything that can potentially cause application oddities, but for which I am automatically recovering. (Such as switching from a primary to backup server, retrying an operation, missing secondary data, etc.)
Error - Any error which is fatal to the operation, but not the service or application (can't open a required file, missing data, etc.). These errors will force user (administrator, or direct user) intervention. These are usually reserved (in my apps) for incorrect connection strings, missing services, etc.
Fatal - Any error that is forcing a shutdown of the service or application to prevent data loss (or further data loss). I reserve these only for the most heinous errors and situations where there is guaranteed to have been data corruption or loss.
لینک پاسخ در استک : https://stackoverflow.com/a/2031209/7006262
لینک کانال تلگرام : https://t.me/moderncpp_ir
#log #level #trace #debug #info #warn #error #fatal
Trace - Only when I would be "tracing" the code and trying to find one part of a function specifically.
Debug - Information that is diagnostically helpful to people more than just developers (IT, sysadmins, etc.).
Info - Generally useful information to log (service start/stop, configuration assumptions, etc). Info I want to always have available but usually don't care about under normal circumstances. This is my out-of-the-box config level.
Warn - Anything that can potentially cause application oddities, but for which I am automatically recovering. (Such as switching from a primary to backup server, retrying an operation, missing secondary data, etc.)
Error - Any error which is fatal to the operation, but not the service or application (can't open a required file, missing data, etc.). These errors will force user (administrator, or direct user) intervention. These are usually reserved (in my apps) for incorrect connection strings, missing services, etc.
Fatal - Any error that is forcing a shutdown of the service or application to prevent data loss (or further data loss). I reserve these only for the most heinous errors and situations where there is guaranteed to have been data corruption or loss.
لینک پاسخ در استک : https://stackoverflow.com/a/2031209/7006262
لینک کانال تلگرام : https://t.me/moderncpp_ir
#log #level #trace #debug #info #warn #error #fatal
Stack Overflow
When to use the different log levels
There are different ways to log messages, in order of fatality:
FATAL
ERROR
WARN
INFO
DEBUG
TRACE
How do I decide when to use which?
What's a good heuristic to use?
FATAL
ERROR
WARN
INFO
DEBUG
TRACE
How do I decide when to use which?
What's a good heuristic to use?
ModernCpp.ir
تعریف موقعیت استفاده از لاگ لولهای مختلف در برنامه Trace - Only when I would be "tracing" the code and trying to find one part of a function specifically. Debug - Information that is diagnostically helpful to people more than just developers (IT, sysadmins…
به زبان ساده:
- لول trace وقتی استفاده میشه که داری با لاگ انداختن چک میکنی یه چیزی رو و قراره پاک بشه کامل 😅
- لول debug هرچی که به درد دیباگ میخوره و اگر توسعه دهنده یا کاربر حرفه ای بشینه پاش بفهمه چه خبره و داره توی برنامه چی میگذره
- لول warn برای مشکلاتی که پیش میاد ولی به صورت خودکار داره حل میشه
- لول error برای وقتی که مشکلی توی یک عملیات پیش میاد ولی اثری روی کارکرد برنامه اصلی نداره
- لول fatal برای وقتی که توی برنامه اصلی مشکلی پیش میاد و دیگه قابل ادامه نیست
کتابخانههالی لاگ استاندارد مثل boost هم از همه این موارد پشتیبانی میکنند و میتونید استفاده کنید.
لینک کانال تلگرام : https://t.me/moderncpp_ir
#log #level #trace #debug #info #warn #error #fatal
- لول trace وقتی استفاده میشه که داری با لاگ انداختن چک میکنی یه چیزی رو و قراره پاک بشه کامل 😅
- لول debug هرچی که به درد دیباگ میخوره و اگر توسعه دهنده یا کاربر حرفه ای بشینه پاش بفهمه چه خبره و داره توی برنامه چی میگذره
- لول warn برای مشکلاتی که پیش میاد ولی به صورت خودکار داره حل میشه
- لول error برای وقتی که مشکلی توی یک عملیات پیش میاد ولی اثری روی کارکرد برنامه اصلی نداره
- لول fatal برای وقتی که توی برنامه اصلی مشکلی پیش میاد و دیگه قابل ادامه نیست
کتابخانههالی لاگ استاندارد مثل boost هم از همه این موارد پشتیبانی میکنند و میتونید استفاده کنید.
لینک کانال تلگرام : https://t.me/moderncpp_ir
#log #level #trace #debug #info #warn #error #fatal
محققان دانشگاه MIT به دستاوردی جدید در فرایند تصحیح خطای کوانتومی دست یافتند
لینک خبر : https://www.zoomit.ir/fundamental-science/372620-mit-new-achievement-in-error-correction-quantum-computing
لینک کانال تلگرام : https://t.me/moderncpp_ir
#achievement #error #correction #quantum #computing
لینک خبر : https://www.zoomit.ir/fundamental-science/372620-mit-new-achievement-in-error-correction-quantum-computing
لینک کانال تلگرام : https://t.me/moderncpp_ir
#achievement #error #correction #quantum #computing