Tomcat控制台对垃圾邮件进行精细记录

时间:2018-07-19 08:22:27

标签: java apache tomcat

问题:我的tomcat 8安装正在以垃圾邮件的形式发送垃圾邮件。

说明: 控制台(我正在读取 catalina.out 文件中的内容)显示了很好的日志记录级别,其中有很多类似这样的消息:

  

精细:在1531987122838处启动过期会话StandardManager   sessioncount 0 lug 19,2018 9:58:42 AM   org.apache.catalina.session.ManagerBase processExpires

     

精细:结束过期会话StandardManager处理时间0过期会话:0   吊耳19,2018 9:58:47 AM   org.apache.catalina.authenticator.AuthenticatorBase调用

     

精细:安全检查请求POST / Artemide / HEARTBEAT / lug 19,2018   上午9:58:47 org.apache.catalina.authenticator.AuthenticatorBase调用

     

精细:不受任何限制凸耳19,2018 9:59:02 AM   org.apache.catalina.authenticator.AuthenticatorBase调用

     

精细:安全检查请求GET / Artemide / PUSH lug 19,2018 9:59:02 AM   org.apache.catalina.authenticator.AuthenticatorBase调用

我所做的事情: 我遵循了一个教程,该教程教导将文件logging.properties放入tomcat安装路径内的文件夹conf中。这是内容,但仍然无法正常工作。

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler

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

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

1catalina.org.apache.juli.AsyncFileHandler.level = WARNING
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.

2localhost.org.apache.juli.AsyncFileHandler.level = WARNING
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.

3manager.org.apache.juli.AsyncFileHandler.level = WARNING
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.

4host-manager.org.apache.juli.AsyncFileHandler.level = WARNING
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.

java.util.logging.ConsoleHandler.level = WARNING
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler

# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
org.apache.catalina.util.LifecycleBase.level = WARNING

# To see debug messages in TldLocationsCache, uncomment the following line:
#org.apache.jasper.compiler.TldLocationsCache.level = WARNING

# To see debug messages for HTTP/2 handling, uncomment the following line:
#org.apache.coyote.http2.level = WARNING

# To see debug messages for WebSocket handling, uncomment the following line:
org.apache.tomcat.websocket.level = WARNING
org.apache.catalina.core.StandardContext.level = WARNING
org.apache.tomcat.util.digester.Digester.level = WARNING

问题: 我不知道要降低tomcat的loggin级别必须调整的位置。

0 个答案:

没有答案