Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:apache_tomcat_7_-_logging_-_log4j

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:apache_tomcat_7_-_logging_-_log4j [2015/05/08 10:45] – [tomcat-juli.jar] klaustachtler:apache_tomcat_7_-_logging_-_log4j [2018/05/02 06:36] (aktuell) – [Herunterladen] klaus
Zeile 2: Zeile 2:
  
 [[http://tomcat.apache.org/|{{:tachtler:index:tomcat-48x48.png }}]] [[http://tomcat.apache.org/|Apache Tomcat]] stellt eine Umgebung zur Ausführung von Java-Code für Web-Server bereit. Es handelt sich um einen Servlet-Container, der mithilfe des //JSP-Compilers Jasper// //JavaServer Pages// in //Servlets// übersetzen und ausführt. Zusätzlich ist ein kompletter HTTP-Server integriert. [[http://tomcat.apache.org/|{{:tachtler:index:tomcat-48x48.png }}]] [[http://tomcat.apache.org/|Apache Tomcat]] stellt eine Umgebung zur Ausführung von Java-Code für Web-Server bereit. Es handelt sich um einen Servlet-Container, der mithilfe des //JSP-Compilers Jasper// //JavaServer Pages// in //Servlets// übersetzen und ausführt. Zusätzlich ist ein kompletter HTTP-Server integriert.
 +
 +:!: **ACHTUNG** - **Nach einem Update, wird ''tomcat-juli-jar'' überschrieben !!! ** - **ACHTUNG** :!:
 +
 +Nachfolgende Schritte müssen **__bei__** einem Update **erneut** durchgeführt werden:
 +  * Siehe auch den internen Link: [[tachtler:apache_tomcat_7_-_logging_-_log4j#herunterladen|Apache Tomcat 7 - Logging - log4j - Herunterladen]]
 +  * Siehe auch den internen Link: [[tachtler:apache_tomcat_7_-_logging_-_log4j#tomcat-julijar|Apache Tomcat 7 - Logging - log4j - Installation - tomcat-juli.jar]]
  
 Damit [[http://tomcat.apache.org/|Apache Tomcat]] dessen eigene Log-Dateien wie z.B. Damit [[http://tomcat.apache.org/|Apache Tomcat]] dessen eigene Log-Dateien wie z.B.
Zeile 10: Zeile 16:
   * **''manager.YYYY-MM-DD.log''**   * **''manager.YYYY-MM-DD.log''**
 auch mithilfe von [[http://logging.apache.org/log4j/1.2/|log4j]] aufbereiten und schreiben kann, sind nachfolgende Schritte notwendig. auch mithilfe von [[http://logging.apache.org/log4j/1.2/|log4j]] aufbereiten und schreiben kann, sind nachfolgende Schritte notwendig.
 +
 +Die Log-Dateien haben nach der Umstellung wieder nachfolgende Namen:
 +  * **''catalina.out''**
 +  * **''host-manager.log''**
 +  * **''localhost.log''**
 +  * **''localhost_access_log.YYYY-MM-DD.txt''**
 +  * **''manager.log''**
 +und können so durch Anpassung der Konfigurationsdatei
 +  * ''etc/logrotate.d/tomcat''
 +wieder durch den **Standard**-Log-Rotrate-Mechanismus von [[http://www.centos.org|CentOS]] rotiert werden!
  
 :!: **HINWEIS** - Die Originalbeschreibung zur Einbindung von [[http://logging.apache.org/log4j/1.2/|log4j]], kann unter nachfolgendem Link aufgerufen werden: :!: **HINWEIS** - Die Originalbeschreibung zur Einbindung von [[http://logging.apache.org/log4j/1.2/|log4j]], kann unter nachfolgendem Link aufgerufen werden:
Zeile 17: Zeile 33:
  
 Nachfolgende Dateien müssen zur Nutzung von [[http://logging.apache.org/log4j/1.2/|log4j]] für die Verwendung in eigenen Log-Dateien des [[http://tomcat.apache.org/|Apache Tomcat]] heruntergeladen werden: Nachfolgende Dateien müssen zur Nutzung von [[http://logging.apache.org/log4j/1.2/|log4j]] für die Verwendung in eigenen Log-Dateien des [[http://tomcat.apache.org/|Apache Tomcat]] heruntergeladen werden:
-  * **''[[http://apache.openmirror.de/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli-adapters.jar]]''** +  * **''[[https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli-adapters.jar]]''** 
-  * **''[[http://apache.openmirror.de/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli.jar]]''**+  * **''[[https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli.jar]]''**
  
 Nachfolgende Befehle können zum Download (in das ''/tmp''-Verzeichnis) genutzt werden: Nachfolgende Befehle können zum Download (in das ''/tmp''-Verzeichnis) genutzt werden:
 <code> <code>
-# wget http://apache.openmirror.de/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli-adapters.jar -P /tmp +# wget https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli-adapters.jar -P /tmp 
---2015-05-08 10:38:12--  http://apache.openmirror.de/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli-adapters.jar +--2018-05-02 06:34:28--  https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli-adapters.jar 
-Resolving apache.openmirror.de (apache.openmirror.de)... 83.246.74.136 +Resolving archive.apache.org (archive.apache.org)... 163.172.17.199 
-Connecting to apache.openmirror.de (apache.openmirror.de)|83.246.74.136|:80... connected.+Connecting to archive.apache.org (archive.apache.org)|163.172.17.199|:443... connected.
 HTTP request sent, awaiting response... 200 OK HTTP request sent, awaiting response... 200 OK
 Length: 31865 (31K) [application/java-archive] Length: 31865 (31K) [application/java-archive]
 Saving to: ‘/tmp/tomcat-juli-adapters.jar’ Saving to: ‘/tmp/tomcat-juli-adapters.jar’
  
-100%[======================================>] 31,865       199KB/s   in 0.2s   +100%[======================================>] 31,865      --.-K/s   in 0.06s   
  
-2015-05-08 10:38:12 (199 KB/s) - ‘/tmp/tomcat-juli-adapters.jar’ saved [31865/31865]+2018-05-02 06:34:28 (544 KB/s) - ‘/tmp/tomcat-juli-adapters.jar’ saved [31865/31865]
  
 </code> </code>
 und und
 <code> <code>
-# wget http://apache.openmirror.de/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli.jar -P /tmp +# wget https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli.jar -P /tmp 
---2015-05-08 10:38:39--  http://apache.openmirror.de/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli.jar +--2018-05-02 06:35:51--  https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.61/bin/extras/tomcat-juli.jar 
-Resolving apache.openmirror.de (apache.openmirror.de)... 83.246.74.136 +Resolving archive.apache.org (archive.apache.org)... 163.172.17.199 
-Connecting to apache.openmirror.de (apache.openmirror.de)|83.246.74.136|:80... connected.+Connecting to archive.apache.org (archive.apache.org)|163.172.17.199|:443... connected.
 HTTP request sent, awaiting response... 200 OK HTTP request sent, awaiting response... 200 OK
 Length: 75410 (74K) [application/java-archive] Length: 75410 (74K) [application/java-archive]
 Saving to: ‘/tmp/tomcat-juli.jar’ Saving to: ‘/tmp/tomcat-juli.jar’
  
-100%[======================================>] 75,410       325KB/s   in 0.2s   +100%[======================================>] 75,410      --.-K/s   in 0.1s    
  
-2015-05-08 10:38:40 (325 KB/s) - ‘/tmp/tomcat-juli.jar’ saved [75410/75410]+2018-05-02 06:35:52 (628 KB/s) - ‘/tmp/tomcat-juli.jar’ saved [75410/75410]
  
 </code> </code>
Zeile 134: Zeile 150:
 Abschließend muss für den Einsatz von [[http://logging.apache.org/log4j/1.2/|log4j]] für die Verwendung in eigenen Log-Dateien des [[http://tomcat.apache.org/|Apache Tomcat]] ein wenig Konfigurationsarbeit geleistet werden. Abschließend muss für den Einsatz von [[http://logging.apache.org/log4j/1.2/|log4j]] für die Verwendung in eigenen Log-Dateien des [[http://tomcat.apache.org/|Apache Tomcat]] ein wenig Konfigurationsarbeit geleistet werden.
  
-==== logging.properties ====+==== /etc/tomcat/logging.properties ====
  
 Da die Konfigurationsdatei (''$CATALINA_HOME/conf/logging.properties'') bzw. Da die Konfigurationsdatei (''$CATALINA_HOME/conf/logging.properties'') bzw.
   * **''/usr/share/tomcat/conf/logging.properties''**   * **''/usr/share/tomcat/conf/logging.properties''**
-für den Einsatz mit **''tomcat-juli.jar''** in der gekürzten Version gedacht ist, wird diese nicht weiter benötigt, und kann gelöscht bzw. unbrauchbar gemacht werden, in dem diese Konfigurationsdatei mit nachfolgendem Befehl umbenannt wird+für den Einsatz mit **''tomcat-juli.jar''** in der gekürzten Version gedacht ist, wird diese nicht weiter benötigt, und kann wie nachfolgend gezeigt entsprechend auskommentiert werden: 
-<code> + 
-mv /usr/share/tomcat/conf/logging.properties /usr/share/tomcat/conf/logging.properties.orig+(**Komplette Konfigurationsdatei**) 
 +<code ini
 +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. 
 + 
 +# Tachtler - disabled - 
 +#handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler 
 + 
 +# Tachtler - disabled - 
 +#.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler 
 + 
 +############################################################ 
 +# Handler specific properties. 
 +# Describes specific configuration info for Handlers. 
 +############################################################ 
 + 
 +1catalina.org.apache.juli.FileHandler.level = FINE 
 +1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 
 +1catalina.org.apache.juli.FileHandler.prefix = catalina. 
 + 
 +2localhost.org.apache.juli.FileHandler.level = FINE 
 +2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 
 +2localhost.org.apache.juli.FileHandler.prefix = localhost. 
 + 
 +3manager.org.apache.juli.FileHandler.level = FINE 
 +3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 
 +3manager.org.apache.juli.FileHandler.prefix = manager. 
 + 
 +4host-manager.org.apache.juli.FileHandler.level = FINE 
 +4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 
 +4host-manager.org.apache.juli.FileHandler.prefix = host-manager. 
 + 
 +java.util.logging.ConsoleHandler.level = FINE 
 +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter 
 + 
 + 
 +############################################################ 
 +# 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.FileHandler 
 + 
 +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO 
 +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler 
 + 
 +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.FileHandler 
 + 
 +# 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 = FINE 
 + 
 +# To see debug messages in TldLocationsCache, uncomment the following line: 
 +#org.apache.jasper.compiler.TldLocationsCache.level = FINE 
 +</code> 
 + 
 +**Nachfolgende Änderungen sind relevant:** 
 +<code ini> 
 + 
 +# Tachtler - disabled - 
 +#handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler 
 +</code> 
 +**und** 
 +<code ini> 
 +# Tachtler - disabled - 
 +#.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
 </code> </code>
  
-==== log4j.properties ====+==== /usr/share/tomcat/lib/log4j.properties ====
  
 Nun muss noch im Verzeichnis  Nun muss noch im Verzeichnis 
Zeile 201: Zeile 296:
 log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]=INFO, MANAGER log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]=INFO, MANAGER
 log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager]=INFO, HOST-MANAGER log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager]=INFO, HOST-MANAGER
 +</code>
 +
 +==== /etc/logrotate.d/tomcat ====
 +
 +Damit die nachfolgenden LOG-Dateien 
 +  * **''catalina.out''**
 +  * **''host-manager.log''**
 +  * **''localhost.log''**
 +  * **''manager.log''**
 +rotiert werden können, sind nachfolgende Änderungen an der Konfigurationsdatei:
 +  * ''/etc/logrotate.d/tomcat''
 +erforderlich:
 +<code ini>
 +/var/log/tomcat/catalina.out 
 +/var/log/tomcat/host-manager.out 
 +/var/log/tomcat/localhost.out 
 +/var/log/tomcat/manager.out {   
 +    copytruncate
 +    weekly
 +    rotate 52
 +    compress
 +    missingok
 +    create 0644 tomcat tomcat
 +}
 </code> </code>
  
Zeile 210: Zeile 329:
 </code> </code>
  
-Nach erfolgreichem **Restart**, sollten die Log-Meldungen des [[http://tomcat.apache.org/|Apache Tomcat]] nun wie folgt aussehen, hier am Beispiel von **''/usr/share/tomcat/logs/catalina.YYYY-MM-DD.out''** +**__VORHER__**: 
 + 
 +Mit nachfolgendem Befehl, kann die LOG-Ausgabe des [[http://tomcat.apache.org/|Apache Tomcat]]-Applikation-Servers überprüft werden: 
 +<code> 
 +# cat /usr/share/tomcat/logs/catalina.YYYY-MM-DD.log 
 +</code> 
 +und sollte eine Ausgabe, in etwa wie die nachfolgende erzeugen: 
 +<code> 
 +# cat /usr/share/tomcat/logs/catalina.2015-05-06.log  
 +May 06, 2015 3:53:12 PM org.apache.catalina.core.AprLifecycleListener init 
 +INFO: Loaded APR based Apache Tomcat Native library 1.1.30 using APR version 1.4.8. 
 +May 06, 2015 3:53:12 PM org.apache.catalina.core.AprLifecycleListener init 
 +INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 
 +May 06, 2015 3:53:12 PM org.apache.catalina.core.AprLifecycleListener initializeSSL 
 +INFO: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013) 
 +May 06, 2015 3:53:12 PM org.apache.coyote.AbstractProtocol init 
 +INFO: Initializing ProtocolHandler ["http-apr-8088"
 +May 06, 2015 3:53:12 PM org.apache.coyote.AbstractProtocol init 
 +INFO: Initializing ProtocolHandler ["ajp-apr-127.0.0.1-8099"
 +May 06, 2015 3:53:12 PM org.apache.catalina.startup.Catalina load 
 +INFO: Initialization processed in 782 ms 
 +May 06, 2015 3:53:12 PM org.apache.catalina.core.StandardService startInternal 
 +INFO: Starting service Catalina 
 +May 06, 2015 3:53:12 PM org.apache.catalina.core.StandardEngine startInternal 
 +INFO: Starting Servlet Engine: Apache Tomcat/7.0.54 
 +May 06, 2015 3:53:12 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deploying web application directory /var/lib/tomcat/webapps/host-manager 
 +May 06, 2015 3:54:34 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom 
 +INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [80,939] milliseconds. 
 +May 06, 2015 3:54:34 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deployment of web application directory /var/lib/tomcat/webapps/host-manager has finished in 82,036 ms 
 +May 06, 2015 3:54:34 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deploying web application directory /var/lib/tomcat/webapps/manager 
 +May 06, 2015 3:54:35 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deployment of web application directory /var/lib/tomcat/webapps/manager has finished in 434 ms 
 +May 06, 2015 3:54:35 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deploying web application directory /var/lib/tomcat/webapps/ROOT 
 +May 06, 2015 3:54:35 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deployment of web application directory /var/lib/tomcat/webapps/ROOT has finished in 348 ms 
 +May 06, 2015 3:54:35 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deploying web application directory /var/lib/tomcat/webapps/examples 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body 
 +INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deployment of web application directory /var/lib/tomcat/webapps/examples has finished in 819 ms 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deploying web application directory /var/lib/tomcat/webapps/sample 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deployment of web application directory /var/lib/tomcat/webapps/sample has finished in 360 ms 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deploying web application directory /var/lib/tomcat/webapps/docs 
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory 
 +INFO: Deployment of web application directory /var/lib/tomcat/webapps/docs has finished in 325 ms 
 +May 06, 2015 3:54:36 PM org.apache.coyote.AbstractProtocol start 
 +INFO: Starting ProtocolHandler ["http-apr-8088"
 +May 06, 2015 3:54:36 PM org.apache.coyote.AbstractProtocol start 
 +INFO: Starting ProtocolHandler ["ajp-apr-127.0.0.1-8099"
 +May 06, 2015 3:54:36 PM org.apache.catalina.startup.Catalina start 
 +INFO: Server startup in 84420 ms 
 +</code> 
 + 
 +**__NACHHER__**: 
 + 
 +Nach erfolgreichem **Restart**, sollten die Log-Meldungen des [[http://tomcat.apache.org/|Apache Tomcat]] nun wie folgt aussehen und kann mit nachfolgendem Befehl überprüft werden 
 +<code> 
 +# cat /usr/share/tomcat/logs/catalina.log 
 +</code> 
 +und sollte eine Ausgabe, in etwa wie die nachfolgende erzeugen:
 <code> <code>
 +# cat /usr/share/tomcat/logs/catalina.log
 +2015-05-08 11:03:26,863 [main] INFO  org.apache.catalina.core.AprLifecycleListener- Loaded APR based Apache Tomcat Native library 1.1.30 using APR version 1.4.8.
 +2015-05-08 11:03:26,864 [main] INFO  org.apache.catalina.core.AprLifecycleListener- APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
 +2015-05-08 11:03:27,141 [main] INFO  org.apache.catalina.core.AprLifecycleListener- OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013)
 +2015-05-08 11:03:27,257 [main] INFO  org.apache.coyote.http11.Http11AprProtocol- Initializing ProtocolHandler ["http-apr-8088"]
 +2015-05-08 11:03:27,275 [main] INFO  org.apache.coyote.ajp.AjpAprProtocol- Initializing ProtocolHandler ["ajp-apr-127.0.0.1-8099"]
 +2015-05-08 11:03:27,278 [main] INFO  org.apache.catalina.startup.Catalina- Initialization processed in 815 ms
 +2015-05-08 11:03:27,293 [main] INFO  org.apache.catalina.core.StandardService- Starting service Catalina
 +2015-05-08 11:03:27,293 [main] INFO  org.apache.catalina.core.StandardEngine- Starting Servlet Engine: Apache Tomcat/7.0.54
 +2015-05-08 11:03:27,316 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deploying web application directory /var/lib/tomcat/webapps/host-manager
 +2015-05-08 11:03:28,909 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deployment of web application directory /var/lib/tomcat/webapps/host-manager has finished in 1,592 ms
 +2015-05-08 11:03:28,909 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deploying web application directory /var/lib/tomcat/webapps/manager
 +2015-05-08 11:03:29,568 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deployment of web application directory /var/lib/tomcat/webapps/manager has finished in 659 ms
 +2015-05-08 11:03:29,568 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deploying web application directory /var/lib/tomcat/webapps/ROOT
 +2015-05-08 11:03:29,980 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deployment of web application directory /var/lib/tomcat/webapps/ROOT has finished in 412 ms
 +2015-05-08 11:03:29,980 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deploying web application directory /var/lib/tomcat/webapps/examples
 +2015-05-08 11:03:30,631 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
 +2015-05-08 11:03:30,641 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/core is already defined
 +2015-05-08 11:03:30,643 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
 +2015-05-08 11:03:30,654 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
 +2015-05-08 11:03:30,659 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
 +2015-05-08 11:03:30,668 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
 +2015-05-08 11:03:30,671 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
 +2015-05-08 11:03:30,672 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
 +2015-05-08 11:03:30,673 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
 +2015-05-08 11:03:30,676 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
 +2015-05-08 11:03:30,679 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
 +2015-05-08 11:03:30,681 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
 +2015-05-08 11:03:30,684 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
 +2015-05-08 11:03:30,688 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
 +2015-05-08 11:03:30,690 [localhost-startStop-1] INFO  org.apache.tomcat.util.digester.Digester- TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
 +2015-05-08 11:03:30,733 [localhost-startStop-1] INFO  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]- ContextListener: contextInitialized()
 +2015-05-08 11:03:30,733 [localhost-startStop-1] INFO  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]- SessionListener: contextInitialized()
 +2015-05-08 11:03:30,740 [localhost-startStop-1] INFO  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]- ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@7a5c32a5')
 +2015-05-08 11:03:30,741 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deployment of web application directory /var/lib/tomcat/webapps/examples has finished in 761 ms
 +2015-05-08 11:03:30,741 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deploying web application directory /var/lib/tomcat/webapps/sample
 +2015-05-08 11:03:31,141 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deployment of web application directory /var/lib/tomcat/webapps/sample has finished in 400 ms
 +2015-05-08 11:03:31,141 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deploying web application directory /var/lib/tomcat/webapps/docs
 +2015-05-08 11:03:31,459 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deployment of web application directory /var/lib/tomcat/webapps/docs has finished in 318 ms
 +2015-05-08 11:03:31,464 [main] INFO  org.apache.coyote.http11.Http11AprProtocol- Starting ProtocolHandler ["http-apr-8088"]
 +2015-05-08 11:03:31,480 [main] INFO  org.apache.coyote.ajp.AjpAprProtocol- Starting ProtocolHandler ["ajp-apr-127.0.0.1-8099"]
 +2015-05-08 11:03:31,483 [main] INFO  org.apache.catalina.startup.Catalina- Server startup in 4204 ms
 </code> </code>
  
tachtler/apache_tomcat_7_-_logging_-_log4j.1431074705.txt.gz · Zuletzt geändert: 2015/05/08 10:45 von klaus