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

Doc for wildfly-swarm (throntail) is wrong #191

Closed
cchet opened this issue Mar 31, 2019 · 5 comments
Closed

Doc for wildfly-swarm (throntail) is wrong #191

cchet opened this issue Mar 31, 2019 · 5 comments
Labels
type: bug A general bug type: documentation A documentation update
Milestone

Comments

@cchet
Copy link
Contributor

cchet commented Mar 31, 2019

The doc for throntail displays properties in the format key=value, but this should be key: value

swarm:
  logging:
    custom-handlers:
      GelfLogger:
        attribute-class: biz.paluch.logging.gelf.wildfly.WildFlyGelfLogHandler
        module: biz.paluch.logging
        properties:
            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:
      - GelfLogger

but they should be like this, because its YAML we use here

swarm:
  logging:
    custom-handlers:
      GelfLogger:
        attribute-class: biz.paluch.logging.gelf.wildfly.WildFlyGelfLogHandler
        module: biz.paluch.logging
        properties:
            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:
      - GelfLogger
@mp911de
Copy link
Owner

mp911de commented Mar 31, 2019

Thanks for report. Care to submit a pull request that fixes the docs?

@mp911de mp911de added type: bug A general bug type: documentation A documentation update labels Mar 31, 2019
@cchet
Copy link
Contributor Author

cchet commented Mar 31, 2019

No problem, I'm already on it.
Another thing I recognized is that the module.xml cannot be used as is for thorntail, because the artifacts have to be resolved from a maven repository and cannot be provided as jars.

This is your module.xml:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="biz.paluch.logging">

    <resources>
        <resource-root path="${project.artifactId}-${project.version}.jar" />
        <resource-root path="jedis-${jedis.version}.jar" />
        <resource-root path="commons-pool2-${jedis-commons-pool2.version}.jar" />
    </resources>

    <dependencies>
        <module name="org.apache.log4j" />
        <module name="org.slf4j" />
        <module name="javax.api" />
        <module name="org.jboss.logmanager" />
    </dependencies>
</module>

This is my module.xml:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="biz.paluch.logging">
    <resources>
        <artifact name="biz.paluch.logging:logstash-gelf:1.11.2" />
        <artifact name="redis.clients:jedis:2.9.0" />
        <artifact name="org.apache.commons:commons-pool2:2.4.3" />
    </resources>

    <dependencies>
        <module name="org.apache.log4j" />
        <module name="org.slf4j" />
        <module name="javax.api" />
        <module name="org.jboss.logmanager" />
    </dependencies>
</module>

The main difference is that ressource-root tag is replaced by artifact tag.

May I add/modify the following resources?

  • src/main/assembly/module-thorntail.xml
  • src/main/assembly/assembly.xml

@mp911de
Copy link
Owner

mp911de commented Mar 31, 2019

Yeah, that makes sense, thanks a lot. Given the planned future of Thorntail, I think that we should go forward with your suggestion and not create an entirely new distribution artifact.

@cchet
Copy link
Contributor Author

cchet commented Mar 31, 2019

Created pull request #192

@cchet cchet mentioned this issue Mar 31, 2019
@mp911de mp911de added this to the 1.13.1 milestone Apr 2, 2019
mp911de pushed a commit that referenced this issue Apr 2, 2019
Fix documentation and introduce module-thorntail.xml.

Original pull request: #192
mp911de added a commit that referenced this issue Apr 2, 2019
Update documentation with fixed Thorntail configuration.

Original pull request: #192
mp911de pushed a commit that referenced this issue Apr 2, 2019
Fix documentation and introduce module-thorntail.xml.

Original pull request: #192
mp911de added a commit that referenced this issue Apr 2, 2019
Update documentation with fixed Thorntail configuration.

Original pull request: #192
@mp911de
Copy link
Owner

mp911de commented Apr 2, 2019

Thanks a lot, that's fixed now.

@mp911de mp911de closed this as completed Apr 2, 2019
@mp911de mp911de modified the milestones: 1.13.1, 1.14.0 Jan 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A general bug type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

2 participants