简体   繁体   English

如何仅记录Log4perl中的INFO级别?

[英]How can I log only the INFO level in Log4perl?

log4perl has a threshold option in the configuration file that will log all calls that level or higher. log4perl在配置文件中有一个阈值选项,用于记录所有级别或更高级别的调用。 Is there an option of setting it log only one type of call? 有没有选项设置它只记录一种类型的呼叫? I want to only log calls of level "INFO". 我只想记录级别“INFO”的调用。

Thanks. 谢谢。

I think you can do it using a Log4Perl Filter . 我认为你可以使用Log4Perl过滤器来做到这一点 Use the LevelToMatch property to define which exact level needs to be matched. 使用LevelToMatch属性定义需要匹配的确切级别。

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

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