-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #4572 - Migrating jetty-home logging modules
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
- Loading branch information
Showing
54 changed files
with
408 additions
and
616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html | ||
|
||
[description] | ||
Configure jetty logging mechanism. | ||
Provides a ${jetty.base}/resources/jetty-logging.properties. | ||
|
||
[tags] | ||
logging | ||
|
||
[depends] | ||
resources | ||
|
||
[provides] | ||
logging|default | ||
|
||
[files] | ||
basehome:modules/logging-jetty | ||
|
||
[lib] | ||
lib/logging/slf4j-api-${slf4j.version}.jar | ||
lib/logging/jetty-slf4j-impl-${jetty.version}.jar | ||
|
||
[ini] | ||
slf4j.version?=1.8.0-beta1 | ||
jetty.webapp.addServerClasses+=,${jetty.base.uri}/lib/logging/ | ||
|
8 changes: 8 additions & 0 deletions
8
jetty-home/src/main/resources/modules/logging-jetty/resources/jetty-logging.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Set logging levels from: ALL, TRACE, DEBUG, INFO, WARN, ERROR, OFF | ||
org.eclipse.jetty.LEVEL=INFO | ||
## Configure a level for an arbitrary logger tree | ||
#com.example.LEVEL=INFO | ||
## Configure a level for specific logger | ||
#com.example.MyComponent.LEVEL=INFO | ||
## Hide stacks traces in an arbitrary logger tree | ||
#com.example.STACKS=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
jetty-home/src/main/resources/modules/logging-jul/resources/java-util-logging.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.level=INFO | ||
handlers=java.util.logging.ConsoleHandler | ||
java.util.logging.ConsoleHandler.level=INFO | ||
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter | ||
## Note: The java.util.logging.SimpleFormatter does NOT have the ability to display | ||
## the Thread name of when the logging event occurred, this will make debugging difficult | ||
## See https://stackoverflow.com/questions/6889057/printing-thread-name-using-java-util-logging | ||
java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS [%4$s] (%3$s) - %5$s%6$s%n | ||
#handlers = java.util.logging.FileHandler | ||
#java.util.logging.FileHandler.pattern = ${jetty.logging.dir}/jetty%u.log | ||
#java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html | ||
|
||
[description] | ||
Configure jetty logging to use Log4j Logging | ||
SLF4J is used as the core logging mechanism. | ||
|
||
[tags] | ||
logging | ||
|
||
[depends] | ||
resources | ||
|
||
[provides] | ||
logging | ||
|
||
[files] | ||
basehome:modules/logging-log4j1 | ||
|
||
[lib] | ||
lib/logging/slf4j-api-${slf4j.version}.jar | ||
maven://org.slf4j/slf4j-log4j12/${slf4j.version}|lib/logging/slf4j-log4j12-${slf4j.version}.jar | ||
maven://log4j/log4j/${log4j1.version}|lib/logging/log4j-${log4j.version}.jar | ||
|
||
[ini] | ||
slf4j.version?=1.8.0-beta1 | ||
log4j.version?=1.2.17 | ||
jetty.webapp.addServerClasses+=,${jetty.base.uri}/lib/logging/ | ||
|
||
[license] | ||
SLF4J is distributed under the MIT License. | ||
Copyright (c) 2004-2013 QOS.ch | ||
All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
Log4j is released under the Apache 2.0 license. | ||
http://www.apache.org/licenses/LICENSE-2.0.html |
15 changes: 15 additions & 0 deletions
15
jetty-home/src/main/resources/modules/logging-log4j1/resources/log4j.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | ||
<log4j:configuration debug="false" xmlns:log4j='http://jakarta.apache.org/log4j/'> | ||
|
||
<appender name="console" class="org.apache.log4j.ConsoleAppender"> | ||
<layout class="org.apache.log4j.PatternLayout"> | ||
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] :%t: (%c) - %m%n" /> | ||
</layout> | ||
</appender> | ||
|
||
<root> | ||
<level value="DEBUG" /> | ||
<appender-ref ref="console" /> | ||
</root> | ||
|
||
</log4j:configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html | ||
|
||
[description] | ||
Configure jetty logging to use log4j version 2 | ||
SLF4J is used as the core logging mechanism. | ||
|
||
[tags] | ||
logging | ||
|
||
[depends] | ||
resources | ||
|
||
[provides] | ||
logging | ||
|
||
[files] | ||
basehome:modules/logging-log4j2 | ||
|
||
[lib] | ||
lib/logging/slf4j-api-${slf4j.version}.jar | ||
maven://org.apache.logging.log4j/log4j-slf4j18-impl/${log4j.version}|lib/logging/log4j-slf4j18-impl-${log4j.version}.jar | ||
maven://org.apache.logging.log4j/log4j-api/${log4j.version}|lib/logging/log4j-api-${log4j.version}.jar | ||
maven://org.apache.logging.log4j/log4j-core/${log4j.version}|lib/logging/log4j-core-${log4j.version}.jar | ||
|
||
[ini] | ||
slf4j.version?=1.8.0-beta1 | ||
log4j.version?=2.13.0 | ||
jetty.webapp.addServerClasses+=,${jetty.base.uri}/lib/logging/ | ||
|
||
[license] | ||
Log4j is released under the Apache 2.0 license. | ||
http://www.apache.org/licenses/LICENSE-2.0.html |
13 changes: 13 additions & 0 deletions
13
jetty-home/src/main/resources/modules/logging-log4j2/resources/log4j2.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Configuration> | ||
<Appenders> | ||
<Console name="LogToConsole" target="SYSTEM_OUT"> | ||
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%level] :%t: (%logger) - %msg%n" /> | ||
</Console> | ||
</Appenders> | ||
<Loggers> | ||
<Root level="debug"> | ||
<AppenderRef ref="LogToConsole" /> | ||
</Root> | ||
</Loggers> | ||
</Configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html | ||
|
||
[description] | ||
Configure jetty logging to use Logback Logging. | ||
SLF4J is used as the core logging mechanism. | ||
|
||
[tags] | ||
logging | ||
|
||
[depends] | ||
resources | ||
|
||
[provides] | ||
logging | ||
|
||
[files] | ||
basehome:modules/logging-logback | ||
|
||
[lib] | ||
lib/logging/slf4j-api-${slf4j.version}.jar | ||
maven://ch.qos.logback/logback-classic/${logback.version}|lib/logging/logback-classic-${logback.version}.jar | ||
maven://ch.qos.logback/logback-core/${logback.version}|lib/logging/logback-core-${logback.version}.jar | ||
|
||
[ini] | ||
slf4j.version?=1.8.0-beta1 | ||
logback.version?=1.3.0-alpha4 | ||
jetty.webapp.addServerClasses+=,${jetty.base.uri}/lib/logging/ | ||
|
||
[license] | ||
Logback: the reliable, generic, fast and flexible logging framework. | ||
Copyright (C) 1999-2012, QOS.ch. All rights reserved. | ||
|
||
This program and the accompanying materials are dual-licensed under | ||
either: | ||
|
||
the terms of the Eclipse Public License v1.0 | ||
as published by the Eclipse Foundation: | ||
http://www.eclipse.org/legal/epl-v10.html | ||
|
||
or (per the licensee's choosing) under | ||
the terms of the GNU Lesser General Public License version 2.1 | ||
as published by the Free Software Foundation: | ||
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html |
11 changes: 11 additions & 0 deletions
11
jetty-home/src/main/resources/modules/logging-logback/resources/logback.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<configuration> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%d{HH:mm:ss.SSS} [%level] :%thread: \(%logger\) - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="debug"> | ||
<appender-ref ref="STDOUT" /> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.