2

I would like to set a new path for some logging handlers that is different from ${jboss.server.log.dir}.

This article: General configuration concepts - WildFly 8 talks about how to create the XML node, but where do I place it within standalone.xml??

I've tried many place in standalone.xml, but all of them fail at server start-up.

Thanks, Jason

Jason Holmberg
  • 291
  • 2
  • 17

2 Answers2

3

The path element shall be inside paths parent element.

<paths>
    <path name="example" path="example" relative-to="jboss.server.data.dir"/>
</paths>

You can refer to the config schema for more details $WILDFLY_HOME/docs/schema/jboss-as-config_2_1.xsd

However it's better to make updates via a management interface. For example in the web console under Configuration -> General Configurations -> Paths you can add paths.

You could also use CLI to add a path:

/paths=my.log.dir:add(relative-to="jboss.server.log.dir", path="my-logs")
James R. Perkins
  • 16,800
  • 44
  • 60
Aparna Chaudhary
  • 1,325
  • 8
  • 10
0

Since i don't have 50 reputation i can't post as a comment. Using bitnami/wildfly docker, the CLI command proposed as the answer gave me the following error:

Failed to get the list of the operation properties: "WFLYCTL0030: No resource definition is registered for address [("paths" => "my.log.dir")]"

It worked after changing paths to path:

/path=my.log.dir:add(relative-to="jboss.server.log.dir", path="my-logs")

PS.: Also, Wildfly 10.1.0