奇怪的行为 - 控制台停止打印 [英] Strange behavior - Console stops printing

查看:154
本文介绍了奇怪的行为 - 控制台停止打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我也遇到了一些奇怪的行为,我无法解释。

I have encountered some strange behavior which I can't explain.

我使用升压日志V1登录使用 wtex​​t_ostream_backend 使用 wtex​​t_file_backend 控制台和一个文件。

I'm using boost log v1 to log to the console using wtext_ostream_backend and to a file using wtext_file_backend.

一切通常工作得很好,但就在几天前的应用程序停止打印到控制台,虽然它继续日志记录文件。当我对那里的控制台停止打印该行的文件在我看的东西说奇怪:

Everything usually work fine, but just the other day the application stopped printing to the console, though it continued to log to file. When I looked in the file for the line where the console stopped printing i noted something strange:

0: [02/07/12 13:49:38] [07437538] [info]    Client 10.28.62.1 was disconnected
1: [02/07/12 13:49:40] [07437538] [info]    Received message from 10.50.128.77: [02/07/12 13:49:40] [07437538] [info]    Sent message to 10.50.128.77: 400 ERROR\r\n2[02/07/12 13:49:40] [07437538] [info]    Received message from 10.28.48.9: VERSION\r\n
4: [02/07/12 13:49:40] [07437538] [info]    Received message from 10.28.48.9: VERSION\r\n
3: [02/07/12 13:49:40] [00C79D10] [debug]   Executed command: VersionCommand

如果你看看行 1 可以看到从10.50.118.77收到的消息:突然结束,接下来的消息没有断行写入。否则永远是这样的。

If you look at line 1: you can see that Received message from 10.50.118.77: abruptly end and the next message is written without line breaks. Which otherwise never is the case.

最后一件事打印控制台是从10.50.118.77收到的消息:

The last thing the console printed was Received message from 10.50.118.77:.

任何想法可能会导致这样?难道是一些奇怪的字符随后收到的报文从10.50.118.77:这一切都弄乱了?如何避免/忍受这样的角色?

Any ideas what might cause this? Could it be some weird character that followed Received message from 10.50.118.77: that messes everything up? How can avoid/tolerate such characters?

推荐答案

也许你没有用空字符正确地终止字符串。

Maybe you didn't terminate the string with a null char properly.

这篇关于奇怪的行为 - 控制台停止打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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