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

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

问题描述

来自docs:

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

我没有找不到任何解释为什么需要写处理程序和后处理程序?
是否有类似属性文件的通用规则?
谢谢。

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

推荐答案

第一行声明可以/将要使用的处理程序集,第二行指定特定记录器的处理程序(在这种情况下,根记录器为 .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).

稍后on logging.properties 已配置每个处理程序。

Later on in logging.properties each handler is configured.

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

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