简体   繁体   中英

Logging how much

Here is our scenario. A wpf app works fine in dev environment. When published to other environments such as staging, UAT & prodn environments we run into issues.

To figure out the issues is it a good idea to have a line which calls a log message after every line of code with Debug directives.

If so how to handle it in release mode. Our concern is every call to log ends up reading and writing to a file will this affect the performance.

If so any suggestions. Thanks N

You could use log tags (instead of log levels) to break these calls down into manageable chunks, then turn logging ON or OFF for the tags in the production environment. My tagalog library can help: https://github.com/dorkitude/tagalog

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM