为什么我们需要在 tomcat logging.properties 中写入两次处理程序? [英] Why we need two times write handlers in tomcat logging.properties?

查看:25
本文介绍了为什么我们需要在 tomcat logging.properties 中写入两次处理程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自文档:

handlers = 1catalina.org.apache.juli.FileHandler, 
       2localhost.org.apache.juli.FileHandler, 
       3manager.org.apache.juli.FileHandler, 
       java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.FileHandler, 
       java.util.logging.ConsoleHandler

我没有找到任何解释为什么需要写处理程序和 .handlers 之后?类似的属性文件是否有共同的规则?

I didn't found any explanation why need write handlers and after .handlers? Are there common rules for similar properties files?

推荐答案

第一行声明可以/将使用的处理程序集,第二行将处理程序分配给特定的记录器(在这种情况下,根记录器为 .handlers 没有前缀.

The first line declares the set of handlers that can/will be used, the second one assigns handlers to the specific logger (in this case root logger as .handlers is not prefixed with anything).

稍后在 logging.properties 中配置每个处理程序.

Later on in logging.properties each handler is configured.

这篇关于为什么我们需要在 tomcat logging.properties 中写入两次处理程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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