tachtler:apache_tomcat_7_-_logging_-_log4j
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
tachtler:apache_tomcat_7_-_logging_-_log4j [2015/05/08 10:42] – [tomcat-juli.jar] klaus | tachtler:apache_tomcat_7_-_logging_-_log4j [2018/05/02 06:36] (aktuell) – [Herunterladen] klaus | ||
---|---|---|---|
Zeile 2: | Zeile 2: | ||
[[http:// | [[http:// | ||
+ | |||
+ | :!: **ACHTUNG** - **Nach einem Update, wird '' | ||
+ | |||
+ | Nachfolgende Schritte müssen **__bei__** einem Update **erneut** durchgeführt werden: | ||
+ | * Siehe auch den internen Link: [[tachtler: | ||
+ | * Siehe auch den internen Link: [[tachtler: | ||
Damit [[http:// | Damit [[http:// | ||
Zeile 10: | Zeile 16: | ||
* **'' | * **'' | ||
auch mithilfe von [[http:// | auch mithilfe von [[http:// | ||
+ | |||
+ | Die Log-Dateien haben nach der Umstellung wieder nachfolgende Namen: | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | und können so durch Anpassung der Konfigurationsdatei | ||
+ | * '' | ||
+ | wieder durch den **Standard**-Log-Rotrate-Mechanismus von [[http:// | ||
:!: **HINWEIS** - Die Originalbeschreibung zur Einbindung von [[http:// | :!: **HINWEIS** - Die Originalbeschreibung zur Einbindung von [[http:// | ||
Zeile 17: | Zeile 33: | ||
Nachfolgende Dateien müssen zur Nutzung von [[http:// | Nachfolgende Dateien müssen zur Nutzung von [[http:// | ||
- | * **'' | + | * **'' |
- | * **'' | + | * **'' |
Nachfolgende Befehle können zum Download (in das ''/ | Nachfolgende Befehle können zum Download (in das ''/ | ||
< | < | ||
- | # wget http://apache.openmirror.de/ | + | # wget https://archive.apache.org/dist/ |
- | --2015-05-08 10:38:12-- | + | --2018-05-02 06:34:28-- |
- | Resolving apache.openmirror.de | + | Resolving |
- | Connecting to apache.openmirror.de | + | 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/ | Length: 31865 (31K) [application/ | ||
Saving to: ‘/ | Saving to: ‘/ | ||
- | 100%[======================================> | + | 100%[======================================> |
- | 2015-05-08 10:38:12 (199 KB/s) - ‘/ | + | 2018-05-02 06:34:28 (544 KB/s) - ‘/ |
</ | </ | ||
und | und | ||
< | < | ||
- | # wget http://apache.openmirror.de/ | + | # wget https://archive.apache.org/dist/ |
- | --2015-05-08 10:38:39-- | + | --2018-05-02 06:35:51-- |
- | Resolving apache.openmirror.de | + | Resolving |
- | Connecting to apache.openmirror.de | + | 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/ | Length: 75410 (74K) [application/ | ||
Saving to: ‘/ | Saving to: ‘/ | ||
- | 100%[======================================> | + | 100%[======================================> |
- | 2015-05-08 10:38:40 (325 KB/s) - ‘/ | + | 2018-05-02 06:35:52 (628 KB/s) - ‘/ |
</ | </ | ||
Zeile 117: | Zeile 133: | ||
# chown root:root / | # chown root:root / | ||
</ | </ | ||
+ | |||
+ | :!: **HINWEIS** - Der Grund für diese Vorgehensweise ist, das im Verzeichnis | ||
+ | * **''/ | ||
+ | ein **Link** auf die Datei | ||
+ | * **''/ | ||
+ | verwendet wird! | ||
Dies kann mit nachfolgendem Befehl überprüft werden: | Dies kann mit nachfolgendem Befehl überprüft werden: | ||
Zeile 128: | Zeile 150: | ||
Abschließend muss für den Einsatz von [[http:// | Abschließend muss für den Einsatz von [[http:// | ||
- | ==== logging.properties ==== | + | ==== / |
Da die Konfigurationsdatei ('' | Da die Konfigurationsdatei ('' | ||
* **''/ | * **''/ | ||
- | für den Einsatz mit **'' | + | für den Einsatz mit **'' |
- | < | + | |
- | # mv /usr/share/tomcat/conf/ | + | (**Komplette Konfigurationsdatei**) |
+ | < | ||
+ | # Licensed to the Apache Software Foundation (ASF) under one or more | ||
+ | # contributor license agreements. | ||
+ | # this work for additional information regarding copyright ownership. | ||
+ | # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
+ | # (the " | ||
+ | # the License. | ||
+ | # | ||
+ | # 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, | ||
+ | |||
+ | # Tachtler - disabled - | ||
+ | #.handlers = 1catalina.org.apache.juli.FileHandler, | ||
+ | |||
+ | ############################################################ | ||
+ | # 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}/ | ||
+ | 2localhost.org.apache.juli.FileHandler.prefix = localhost. | ||
+ | |||
+ | 3manager.org.apache.juli.FileHandler.level = FINE | ||
+ | 3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/ | ||
+ | 3manager.org.apache.juli.FileHandler.prefix = manager. | ||
+ | |||
+ | 4host-manager.org.apache.juli.FileHandler.level = FINE | ||
+ | 4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/ | ||
+ | 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 | ||
+ | # 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: | ||
+ | # | ||
+ | |||
+ | # To see debug messages in TldLocationsCache, | ||
+ | # | ||
+ | </code> | ||
+ | |||
+ | **Nachfolgende Änderungen sind relevant: | ||
+ | <code ini> | ||
+ | |||
+ | # Tachtler - disabled - | ||
+ | #handlers = 1catalina.org.apache.juli.FileHandler, | ||
+ | </ | ||
+ | **und** | ||
+ | <code ini> | ||
+ | # Tachtler - disabled - | ||
+ | #.handlers = 1catalina.org.apache.juli.FileHandler, | ||
</ | </ | ||
- | ==== log4j.properties ==== | + | ==== / |
Nun muss noch im Verzeichnis | Nun muss noch im Verzeichnis | ||
Zeile 195: | Zeile 296: | ||
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ | log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ | ||
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ | log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ | ||
+ | </ | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | Damit die nachfolgenden LOG-Dateien | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | rotiert werden können, sind nachfolgende Änderungen an der Konfigurationsdatei: | ||
+ | * ''/ | ||
+ | erforderlich: | ||
+ | <code ini> | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | copytruncate | ||
+ | weekly | ||
+ | rotate 52 | ||
+ | compress | ||
+ | missingok | ||
+ | create 0644 tomcat tomcat | ||
+ | } | ||
</ | </ | ||
Zeile 204: | Zeile 329: | ||
</ | </ | ||
- | Nach erfolgreichem **Restart**, | + | **__VORHER__**: |
+ | |||
+ | Mit nachfolgendem Befehl, kann die LOG-Ausgabe des [[http:// | ||
+ | < | ||
+ | # cat / | ||
+ | </ | ||
+ | und sollte eine Ausgabe, in etwa wie die nachfolgende erzeugen: | ||
+ | < | ||
+ | # cat / | ||
+ | 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: | ||
+ | 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 [" | ||
+ | May 06, 2015 3:53:12 PM org.apache.coyote.AbstractProtocol init | ||
+ | INFO: Initializing ProtocolHandler [" | ||
+ | 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/ | ||
+ | May 06, 2015 3:53:12 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deploying web application directory / | ||
+ | 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 / | ||
+ | May 06, 2015 3:54:34 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deploying web application directory / | ||
+ | May 06, 2015 3:54:35 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deployment of web application directory / | ||
+ | May 06, 2015 3:54:35 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deploying web application directory / | ||
+ | May 06, 2015 3:54:35 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deployment of web application directory / | ||
+ | May 06, 2015 3:54:35 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deploying web application directory / | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.TaglibUriRule body | ||
+ | INFO: TLD skipped. URI: http:// | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deployment of web application directory / | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deploying web application directory / | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deployment of web application directory / | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deploying web application directory / | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.HostConfig deployDirectory | ||
+ | INFO: Deployment of web application directory / | ||
+ | May 06, 2015 3:54:36 PM org.apache.coyote.AbstractProtocol start | ||
+ | INFO: Starting ProtocolHandler [" | ||
+ | May 06, 2015 3:54:36 PM org.apache.coyote.AbstractProtocol start | ||
+ | INFO: Starting ProtocolHandler [" | ||
+ | May 06, 2015 3:54:36 PM org.apache.catalina.startup.Catalina start | ||
+ | INFO: Server startup in 84420 ms | ||
+ | </ | ||
+ | |||
+ | **__NACHHER__**: | ||
+ | |||
+ | Nach erfolgreichem **Restart**, | ||
+ | < | ||
+ | # cat / | ||
+ | </ | ||
+ | und sollte eine Ausgabe, in etwa wie die nachfolgende erzeugen: | ||
< | < | ||
+ | # cat / | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
+ | 2015-05-08 11: | ||
</ | </ | ||
tachtler/apache_tomcat_7_-_logging_-_log4j.1431074569.txt.gz · Zuletzt geändert: 2015/05/08 10:42 von klaus