简体   繁体   English

记录多少

[英]Logging how much

Here is our scenario. 这是我们的场景。 A wpf app works fine in dev environment. WPF应用程序在开发环境中运行良好。 When published to other environments such as staging, UAT & prodn environments we run into issues. 当发布到其他环境(例如暂存,UAT和产品环境)时,我们会遇到问题。

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. 要找出问题所在,最好在每行带有Debug指令的代码行之后都有一条调用日志消息的行。

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 谢谢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 我的他加禄语图书馆可以提供帮助: https : //github.com/dorkitude/tagalog

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用Java记录任务完成多少时间的智能解决方案是什么? - What is a smart solution for the logging of how much time a task is completed in Java? 如何知道何时有太多的日志消息? - How to know when there's too much logging messages? 添加第三方记录服务如何影响我必须向Heroku支付多少 - How does adding a 3rd party logging service affect how much i have to pay to Heroku Android LogCat 记录方式太多东西 - Android LogCat Logging way too much stuff Azure 身份 API 记录了太多日志 - Azure-identity APIs logging too much logs 在应用程序中登录多少以及多少? - How much to log within an application and how much is too much? 调试日志记录是否会减慢我的(grails)Web应用程序的速度? - Does much debug logging slow my (grails) web application down? 如何使用日志库? (在 Python 中实现日志记录) - How to use logging library? (Implement logging in Python) 什么是日志记录,Apache Commons日志记录是如何使用的? - What is Logging, and how is Apache Commons logging used? Python日志记录:如何将日志记录级别作为参数传递 - Python Logging: How to pass logging level as an argument
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM