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

Commit

Permalink
Polishing #191
Browse files Browse the repository at this point in the history
Update documentation with fixed Thorntail configuration.

Original pull request: #192
  • Loading branch information
mp911de committed Apr 2, 2019
1 parent 820838c commit ee04691
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions src/site/markdown/examples/wildfly-swarm-thorntail.md.vm
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Thorntail (WildFly Swarm 2.x)
=========
: : : : : : : : :

Following settings can be used:

| Attribute Name | Description | Default |
| ----------------- |:------------------------------------:|:-------:|
| enabled | Whether this handler is enabled | `true` |
| 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 All @@ -18,9 +18,9 @@ Following settings can be used:
| mdcProfiling | Perform Profiling (Call-Duration) based on MDC Data. See [MDC Profiling](../mdcprofiling.html) for details | `false` |
| level | Log-Level threshold | `INFO` |
| filter | Class-Name of a Log-Filter | none |
| additionalFields | Send additional static fields. The fields are specified as key-value pairs are comma-separated. Example: `additionalFields=fieldName=Value,fieldName2=Value2` | none |
| additionalFieldTypes | Type specification for additional and MDC fields. Supported types: `String`, `long`, `Long`, `double`, `Double` and `discover` (default if not specified, discover field type on parseability). Eg. field=String,field2=double | `discover` for all additional fields |
| mdcFields | Send additional fields whose values are obtained from MDC. Name of the Fields are comma-separated. Example: `mdcFields=Application,Version,SomeOtherFieldName` | none |
| additionalFields | Send additional static fields. The fields are specified as key-value pairs are comma-separated. Example: `additionalFields: fieldName: Value,fieldName2: Value2` | none |
| additionalFieldTypes | Type specification for additional and MDC fields. Supported types: `String`, `long`, `Long`, `double`, `Double` and `discover` (default if not specified, discover field type on parseability). Eg. field: String,field2: double | `discover` for all additional fields |
| mdcFields | Send additional fields whose values are obtained from MDC. Name of the Fields are comma-separated. Example: `mdcFields: Application,Version,SomeOtherFieldName` | none |
| dynamicMdcFields | Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regexes are comma-separated. The name of the MDC entry is used as GELF field name. | none |
| includeFullMdc | Include all fields from the MDC. | `false` |
| maximumMessageSize| Maximum message size (in bytes). If the message size is exceeded, the appender will submit the message in multiple chunks. | `8192` |
Expand All @@ -34,8 +34,8 @@ Preliminary Steps
If you want to get started with the logstash-gelf support for WildFly Swarm/Thorntail, you will need to integrate logstash-gelf as a module within the server. It is possible to create the module manually, but it's easier to use the prepackaged binary and extract the `module.xml` file.
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)
2. Extract the module to and copy `module.xml` to `src/main/resources/modules/biz/paluch/logging/main`.
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 and copy `module-thorntail.xml` to `src/main/resources/modules/biz/paluch/logging/main/module.xml`.
3. Configure the logging subsystem using `src/main/resources/project-stages.yml`:

Logging Configuration
Expand All @@ -51,22 +51,21 @@ swarm:
attribute-class: biz.paluch.logging.gelf.wildfly.WildFlyGelfLogHandler
module: biz.paluch.logging
properties:
enabled=true
host=udp:localhost
port=12201
version=1.0
facility=java-test
extractStackTrace=true
filterStackTrace=true
includeLocation=true
mdcProfiling=true
timestampPattern=yyyy-MM-dd HH:mm:ss,SSS
maximumMessageSize=8192
additionalFields=fieldName1=fieldValue1,fieldName2=fieldValue2
additionalFieldTypes=fieldName1=String,fieldName2=Double,fieldName3=Long
MdcFields=mdcField1,mdcField2
dynamicMdcFields=mdc.*,(mdc|MDC)fields
includeFullMdc=true
host: "udp:localhost"
port: 12201
version: "1.0"
facility: "java-test"
extractStackTrace: true
filterStackTrace: true
includeLocation: true
mdcProfiling: true
timestampPattern: "yyyy-MM-dd HH:mm:ss,SSS"
maximumMessageSize: 8192
additionalFields: "fieldName1=fieldValue1,fieldName2=fieldValue2"
additionalFieldTypes: "fieldName1=String,fieldName2=Double,fieldName3=Long"
MdcFields: "mdcField1,mdcField2"
dynamicMdcFields: "mdc.*,(mdc|MDC)fields"
includeFullMdc: true
root-logger:
level: INFO
handlers:
Expand Down

0 comments on commit ee04691

Please sign in to comment.