需要帮助以通过日志记录来改进调试 [英] Need help to improve debugging by logging

查看:44
本文介绍了需要帮助以通过日志记录来改进调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

在我的工作中,我需要在C ++中记录一个项目的大量文件,在该项目中,我需要在没有任何帮助的情况下重新定义现有功能.
我想记录大量文件.
我知道您的抽象水平很高,
因为您使用graphviz来可视化依赖关系图.太棒了!

致以最诚挚的问候,在此先感谢您的帮助,并再次感谢您的共享!!!!

Hello,

in my job I need to log a big number of files in C++ for a project where I need to reegineer an existing functionality without any help.
I want to log a big amount of files.
I see that you have the good level of abstraction,
since you use graphviz to visualize dependency graph. and it s great !!!

best regards and thanks in advance for any help and thanks again for sharing !!!

推荐答案

写道:

我看到您的抽象水平很高,
因为您使用graphviz来可视化依赖图.太棒了!!!!

I see that you have the good level of abstraction,
since you use graphviz to visualize dependency graph. and it s great !!!



你到底在说什么.您是在某处指代文章吗?

我不太了解您需要登录什么.我会编写一个带有静态方法的类,然后您可以从任何希望提供日志记录的地方调用该方法.实际上,我几年前为WDJ写过一篇文章,如果我的日志记录应用程序正在运行以显示日志,则使用应用程序之间的Windows消息在发布版本中提供实时日志记录,但是如果您想将它们写入文件,那么可以了.是否想抽象出处理日志的代码,并根据需要调用它.



What on earth are you talking about. Are you referring to an article somewhere ?

I don''t really understand what it is you need to log. I would write a class with static methods that you can then call from where-ever you like to provide logging. I actually wrote an article for WDJ years ago that used windows messages between applications to provide logging in real time in a release build if my logging app was running to show the logs, but if you want to write them to files, then yes, you want to abstract out the code that handles the logging, and call it as needed.


我只能猜测您是否需要在应用程序中添加日志功能?然后只需搜索CP.关于如何实现它的文章很多.
I can only guess that you are in need to add logging capability to your application? Then simply search CP. There are plenty of articles on how to accomplish it.


我正在谈论使用诸如Visual Studio Macro
之类的东西. 在每个函数中插入代码行
C ++ MACRO,它在日志文件中打印所用函数的名称
而且因为有500个文件
我想自动插入此代码行

并对graphViz感到抱歉(这是一个错误)

谢谢您的回答
I am speaking about using something like Visual Studio Macro
to insert in every function a code line
C++ MACRO which prints in a log file the name of the used function
and since there are 500 files
I want to make the insert of this code line automated

And sorry about the graphViz (it was a mistake)

thanks for your answer


这篇关于需要帮助以通过日志记录来改进调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆