Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Commit

Permalink
Upgrade to WildFly 12 #146
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Jun 5, 2018
1 parent f32b33e commit 93b53a3
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 47 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Provides logging to logstash using the Graylog Extended Logging Format ([GELF](h
* [log4j 1.2.x](#log4j)
* [log4j 2.x](#log4j2)
* [JBoss AS7](#jbossas7)
* [WildFly 8/WildFly /WildFly 10](#wildfly)
* [WildFly](#wildfly)
* [Logback](#logback)

See also http://logging.paluch.biz/ or http://www.graylog2.org/resources/gelf/specification for further documentation.
Expand Down Expand Up @@ -296,7 +296,7 @@ Include the library as module (see download above), then add following lines to

<a name="wildfly"/>

WildFly 8/WildFly 9/WildFly 10 configuration
WildFly configuration
--------------------------------------------
Include the library as module (see download above). Place it below the `$JBOSS_HOME/modules/system/layers/base` path, then add following lines to your configuration:

Expand Down
33 changes: 8 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<slf4j-api.version>1.7.13</slf4j-api.version>
<logback-classic.version>1.1.3</logback-classic.version>
<org.jboss.logmanager.version>1.5.2.Final</org.jboss.logmanager.version>
<arquillian.version>1.1.5.Final</arquillian.version>
<arquillian.version>1.4.0.Final</arquillian.version>

<site-plugin.version>3.6</site-plugin.version>
<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
Expand Down Expand Up @@ -407,19 +407,14 @@
<scope>provided</scope>
</dependency>

<!-- Arquillian integration test -->
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-common</artifactId>
<version>1.0.0.Alpha5</version>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-cli</artifactId>
<version>5.0.0.Final</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>sun.jdk</groupId>
<artifactId>jconsole</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Arquillian integration test -->
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
Expand Down Expand Up @@ -507,8 +502,8 @@
<jdk>1.8</jdk>
</activation>
<properties>
<version.wildfly>10.0.0.Final</version.wildfly>
<version.org.wildfly.arquillian>1.0.1.Final</version.org.wildfly.arquillian>
<version.wildfly>12.0.0.Final</version.wildfly>
<version.org.wildfly.arquillian>2.1.0.Final</version.org.wildfly.arquillian>
<jboss.home>${project.build.directory}/wildfly-${version.wildfly}</jboss.home>
</properties>
<dependencies>
Expand All @@ -517,13 +512,6 @@
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>${version.org.wildfly.arquillian}</version>
<scope>test</scope>
<exclusions>
<!-- Pulled in transitively; Neither available on Windows nor on JDK 9 -->
<exclusion>
<groupId>sun.jdk</groupId>
<artifactId>jconsole</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
Expand Down Expand Up @@ -601,11 +589,6 @@
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/examples/wildfly-json.md.vm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ follow the steps to integrate the module:
2. Extract the module to `<WildFly Home>/modules/system/layers/base`.
3. Configure the logging subsystem by either adopting the changes in the XML files or by using the CLI

WildFly 8/WildFly 9/WildFly 10 Logging configuration
WildFly Logging configuration
--------------

XML Configuration:
Expand Down
8 changes: 4 additions & 4 deletions src/site/markdown/examples/wildfly.md.vm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Following settings can be used:

| Attribute Name | Description | Default |
| ----------------- |:------------------------------------:|:-------:|
| host | Hostname/IP-Address of the Logstash host. The `host` field accepts following forms: <ul><li>`tcp:hostname` for TCP transport, e. g. `tcp:127.0.0.1` or `tcp:some.host.com` </li><li>`udp:hostname` for UDP transport, e. g. `udp:127.0.0.1`, `udp:some.host.com` or just `some.host.com` </li><li>`redis://[:password@]hostname:port/db-number#listname` for Redis transport. See [Redis transport for logstash-gelf](../redis.html) for details. </li><li>`redis-sentinel://[:password@]hostname:port/db-number?masterId=masterId#listname` for Redis transport with Sentinel lookup. See [Redis transport for logstash-gelf](../redis.html) for details. </li></ul> | none |
| host | Hostname/IP-Address of the Logstash host. The `host` field accepts following forms: <ul><li>`tcp:hostname` for TCP transport, e. g. `tcp:127.0.0.1` or `tcp:some.host.com` </li><li>`udp:hostname` for UDP transport, e. g. `udp:127.0.0.1`, `udp:some.host.com` or just `some.host.com` </li><li>`redis://[:password@]hostname:port/db-number#listname` for Redis transport. See [Redis transport for logstash-gelf](../redis.html) for details. </li><li>`redis-sentinel://[:password@]hostname:port/db-number?masterId=masterId#listname` for Redis transport with Sentinel lookup. See [Redis transport for logstash-gelf](../redis.html) for details. </li></ul> | none |
| port | Port of the Logstash host | `12201` |
| version | GELF Version `1.0` or `1.1` | `1.0` |
| originHost | Originating Hostname | FQDN Hostname |
Expand Down Expand Up @@ -33,12 +33,12 @@ If you want to get started with the logstash-gelf support for WildFly, you will
the server. It is possible to create the module manually, but it's easier to use the prepackaged binary. Please
follow the steps to integrate the module:

1. Obtain the logging module from [Maven](http://search.maven.org/remotecontent?filepath=biz/paluch/logging/logstash-gelf/${logstash-gelf-release-version}/logstash-gelf-${logstash-gelf-release-version}-logging-module.zip) or [Github](https://github.com/mp911de/logstash-gelf/releases/download/logstash-gelf-${logstash-gelf-release-version}/logstash-gelf-${logstash-gelf-release-version}-logging-module.zip)
1. Obtain the logging module from [Maven](http://search.maven.org/remotecontent?filepath=biz/paluch/logging/logstash-gelf/${logstash-gelf-release-version}/logstash-gelf-${logstash-gelf-release-version}-logging-module.zip) or [Github](https://github.com/mp911de/logstash-gelf/releases/download/logstash-gelf-${logstash-gelf-release-version}/logstash-gelf-${logstash-gelf-release-version}-logging-module.zip)
2. Extract the module to `<WildFly Home>/modules/system/layers/base`.
3. Configure the logging subsystem by either adopting the changes in the XML files or by using the CLI


WildFly 8/WildFly 9/WildFly 10 Logging Configuration
WildFly Logging Configuration
--------------

XML Configuration:
Expand Down Expand Up @@ -97,4 +97,4 @@ CLI Configuration:
})

/subsystem=logging/root-logger=ROOT/:write-attribute(name=handlers,value=["FILE","CONSOLE","GelfLogger"])

4 changes: 2 additions & 2 deletions src/site/markdown/index.md.vm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Provides logging to logstash using the Graylog Extended Logging Format (GELF) 1.
* [log4j 1.2.x JSON Layout](examples/log4j-1.2.x-json.html)
* [log4j 2.x](examples/log4j-2.x.html)
* [JBoss 7](examples/jbossas7.html)
* [WildFly 8/WildFly 9/WildFly 10](examples/wildfly.html)
* [WildFly 8/WildFly 9/WildFly 10 JSON Formatter](examples/wildfly-json.html)
* [WildFly](examples/wildfly.html)
* [WildFly JSON Formatter](examples/wildfly-json.html)
* [Logback](examples/logback.html)

How to get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.util.Arrays;
import java.util.List;

import org.jboss.common.beans.property.ByteEditor;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -46,7 +45,6 @@ public void filterWholeStackTrace() {

assertThat(lines).contains("\tSuppressed: java.lang.RuntimeException: suppressed");
assertThat(lines).contains("\t\tCaused by: java.lang.NumberFormatException: For input string: \"text\"");
assertThat(lines).contains("\t\t\t\t\t1 line skipped for [org.jboss]");
}

@Test
Expand Down Expand Up @@ -105,8 +103,7 @@ private Exception intermediate2() {
suppressed1.addSuppressed(suppressed2);

try {
new ByteEditor().setAsText("text");

throw new IllegalArgumentException(new NumberFormatException("For input string: \"text\""));
} catch (Exception e) {
suppressed1.addSuppressed(e);
}
Expand Down
9 changes: 0 additions & 9 deletions src/test/resources/arquillian.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Hibernate OGM, Domain model persistence for NoSQL datastores
~
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
-->
<arquillian xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
Expand All @@ -14,9 +8,6 @@
</engine>

<container qualifier="jboss" default="true">
<protocol type="jmx-as7">
<property name="executionType">REMOTE</property>
</protocol>
<configuration>
<property name="jbossHome">${jboss.home}</property>
<property name="javaVmArguments">-XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -XX:+IgnoreUnrecognizedVMOptions</property>
Expand Down

0 comments on commit 93b53a3

Please sign in to comment.