如何从提供的日志中收集相关信息
How to collect the relevant information from the provided log?
我有一个日志文件,我们从中收集了相关数据。考虑日志文件为
--------other data---------------
Evaluating Function Test1
--other data--
--other data--
Output: This function excecuted successfully
--------other data---------------
--------other data---------------
Evaluating Function Test2
--other data-
--other data--
Output : This function excecuted successfully
--other data--
--other data--
我必须收集文件中针对每个函数的所有输出,如
Test1: Output: This function executed successfully
Test2: Output: This function executed successfully
谁能告诉我收集相关数据的方法?
谁能告诉我收集相关数据的方法?
是的(但是你的问题很模糊)。
您的方法必须(大致)遵循以下步骤:
- 逐行读取文件(有一种规范的方法可以这样做-你会在SO上找到它)
- 检查每一行,看看是否匹配你感兴趣的模式
- 将感兴趣的行存储在容器中(如果它们匹配)
- 解释存储的行(并显示结果)
相关文章:
- 正在查找文档以获得PS4平台的C++中的设备信息
- 为什么在运行时没有向我们提供有关分段错误的更多信息?
- 奇怪的(对我来说)返回声明 - 在谷歌上找不到任何关于它的信息
- EvtExportLogneneneba API正在将远程计算机的事件日志保存到远程PC本身.如何将其保存到主机
- 如何设置一个范围来提取我想要获得的信息
- 系统参数信息A 与 SPI_GETMOUSE 返回 0
- 为什么 gcovr 会生成空覆盖率统计信息?
- 是否可以配置提升日志刷新?
- 我已经阅读了很多关于 2d 数组的信息,但我在作业中使用它时遇到了麻烦
- 跟踪日志中的T.11803()是什么意思?
- 加快在C++中读取/处理日志文件的速度
- 如何将消息时间戳写入日志文件?
- 如何实现具有多个平台__FILE__和__LINE__信息的 C/C++ 可变参数日志记录宏?
- 我正在尝试用 c++ 制作一个日志记录框架,但信息没有传递给记录器的子组件,我做错了什么?
- Poco::Logger 不记录跟踪或调试级别日志,只记录信息级别及以上
- OpenGL glLinkProgram返回false,但信息日志为空;检查一切
- 创建一个简单的窗口来输出用于调试的信息(日志样式)- wxWidgets
- 如何从提供的日志中收集相关信息
- 顶点着色器编译失败,但信息日志中没有消息
- 可以使用位置信息编写改进的cmake日志宏