I would like to have CLI command that will create following configuration in standalone.xml:
...
<subsystem xmlns="urn:jboss:domain:logging:1.3">
...
<custom-handler name="DB" class="com.jeefix.commons.logger.DatabaseHandler" module="com.jeefix">
<level name="ALL"/>
<formatter>
<pattern-formatter pattern="%s%E%n"/>
</formatter>
<properties>
<property name="jdbcUrl" value="${logger.database.url}"/>
<property name="username" value="${logger.database.user}"/>
<property name="password" value="${logger.database.password}"/>
<property name="jdbcDriver" value="oracle.jdbc.driver.OracleDriver"/>
</properties>
</custom-handler>
...
I am able to create everything except list of properties via command:
/subsystem=logging/custom-handler=DB:add(name=DB,class=com.jeefix.commons.logger.DatabaseHandler,module=com.jeefx.dbappender,formatter=%s%E%n,level=ALL)
Question: How can I add list of properties?
try
/subsystem=logging/custom-handler=server/:write-attribute(name=properties,value=[("jdbcUrl" => "your_jdbc_url"),("username" => "jdbc_user_name"),("password" => "jdbc_password"),("jdbcDriver" => "oracle.jdbc.driver.OracleDriver")])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With