[英]Strange behavior - Console stops printing
我遇到了一些無法解釋的奇怪行為。
我使用升壓日志V1登錄到使用控制台wtext_ostream_backend
和文件使用wtext_file_backend
。
一切通常都可以正常工作,但是就在前一天,盡管應用程序繼續記錄到文件,但它停止向控制台打印。 當我在文件中查找控制台停止打印的那一行時,我注意到一些奇怪的事情:
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:
行,則可以看到Received message from 10.50.118.77:
突然結束,並且下一條消息寫入時沒有換行符。 否則情況將永遠不會如此。
控制台最后打印的內容是Received message from 10.50.118.77:
。
有什么想法可能導致這種情況嗎? 可能是Received message from 10.50.118.77:
后出現的一些奇怪的字符Received message from 10.50.118.77:
把所有事情Received message from 10.50.118.77:
了嗎? 如何避免/容忍此類字符?
也許您沒有正確地使用null char終止字符串。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.