简体   繁体   English

如何自定义过滤器配置文件中的升压日志?

[英]how to custom filter in configure file for boost log?

I had customized one sink with configure file, but the customized filter can't compile success with error: 我已经使用配置文件定制了一个接收器,但是定制的过滤器无法成功编译并出现错误:

unexpected character in the end of line. 行尾出现意外字符。

it is caused by "" in ini. 它是由ini中的“”引起的。 so how to solve it? 那么如何解决呢?

if I remove the last line ,it is ok. 如果我删除最后一行,就可以了。

configure file content sample. 配置文件内容样本。

Destination = "TextFile"
FileName = "ModuleOne_%3N.log"
AutoFlush = true
Filter=expr::attr<string>("Channel") == "module one"

Filter="%Channel% contains \\"MySink1\\" and %Severity% > info " is ok. Filter =“%Channel%包含\\” MySink1 \\“,并且%Severity%> info可以。 and make sure before read configure: 并确保在阅读配置之前:

register all the needed attribute ,what's more some types logger had register channel. 注册所有需要的属性,还有一些其他类型的记录器具有注册通道。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM