jboss-cli property format for path attribute

668 views Asked by At

As explained in JBoss EAP 7 documentation, one can pass in a properties file to the CLI instance with the --properties flag.

I'm trying to create a generic script for logging profiles.

This is my properties file:

profilename=myProfileName
filepath=/some/dir/somefile.log

And this is my script:

set profilename=${profilename} 
set filepath=${filepath} 

/profile=full-ha/subsystem=logging/logging-profile=$profilename:add
/profile=full-ha/subsystem=logging/logging-profile=$profilename/periodic-size-rotating-file-handler=myHandler:add(file={"relative-to" => "some.dir","path" => $filepath},suffix=.yyyy-MM-dd,max-backup-index=50,rotate-on-boot=true,rotate-size=20m)

The script doesn't generate any error and completes successfully, and the $profilename variable is correctly replaced by its value.

But the $filepath variable seems to be a problem:

<logging-profile name="myProfileName">
    <periodic-size-rotating-file-handler name="myHandler" rotate-on-boot="true">
        <file relative-to="some.dir" path="$filepath}"/>
        <rotate-size value="20m"/>
        <max-backup-index value="50"/>
        <suffix value=".yyyy-MM-dd"/>
    </periodic-size-rotating-file-handler>
</logging-profile>

What is the specific format to use so that a variable can be used for the path attribute?


Edit: tested with JBoss EAP 7.2, and now it works as expected, so I guess it was indeed a bug.

1

There are 1 answers

0
kirito On

I know this is very late answer, but is the filepath variable last one in your list ? Because this seems like a line ending issue if add new line at the end this would get picked up correctly.