Add: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 25: | Line 25: | ||
<font color=red>TODO</font> | <font color=red>TODO</font> | ||
=Adding | =Adding Children Nodes= | ||
Specify the hierarchical structure as argument to <tt>add(...)</tt>. | Specify the hierarchical structure as argument to <tt>add(...)</tt>. | ||
The | The children management nodes for the node being added with add() are specified as follows: | ||
<pre> | <pre> | ||
...:add(child-node-name-1=node-content-1, child-node-name-2=node-content-2, ...) | |||
</pre> | </pre> | ||
A set of attributes of a child node can be specified as follows: | |||
<pre> | <pre> | ||
/subsystem=logging/file-handler=MYHANDLER:add(file={"path"=>"myfile.log", "relative-to"=>"jboss.server.log.dir"}) | child-node-name={"attribute-name1"=>"attribute-value-1", "attribute-name-2"=>"attribute-value-2", ...} | ||
</pre> | |||
In the particular case the child node has just a single attribute named "value", this is specified as follows: | |||
<pre> | |||
child-node-name="some-node-value" | |||
</pre> | |||
Usage example of the syntax described above: | |||
<pre> | |||
/subsystem=logging/file-handler=MYHANDLER:add(file={"path"=>"myfile.log", "relative-to"=>"jboss.server.log.dir"}, suffix=".yyyy-MM-dd") | |||
</pre> | </pre> | ||
Line 51: | Line 63: | ||
<file-handler name="MYHANDLER"> | <file-handler name="MYHANDLER"> | ||
<file relative-to="jboss.server.log.dir" path="myfile.log"/> | <file relative-to="jboss.server.log.dir" path="myfile.log"/> | ||
<suffix value=".yyyy-MM-dd"/> | |||
</file-handler> | </file-handler> | ||
... | ... | ||
Line 59: | Line 72: | ||
</server> | </server> | ||
</pre> | </pre> | ||
=Adding Attributes to a Newly Added Management Node= | |||
Use the <tt>:write-attribute(...)</tt> operation: | |||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | |||
:[[Write-attribute#Syntax|:write-attribute(...)]] | |||
</blockquote> | |||
=Examples= | |||
* [[WildFly_Logging_Subsystem_CLI_Configuration#Adding_a_Periodic_Rotating_File_Log_Handler|Adding a WildFly Logging System Log Handler]] |
Latest revision as of 04:29, 16 November 2016
Internal
Overview
Adds a resource of given type.
Syntax
/path/<resource-type>:<resource-value>:add(...)
Adding a Node without Content
Use add() without any argument:
/path/<resource-type>:<resource-value>:add()
Example:
TODO
Adding Children Nodes
Specify the hierarchical structure as argument to add(...).
The children management nodes for the node being added with add() are specified as follows:
...:add(child-node-name-1=node-content-1, child-node-name-2=node-content-2, ...)
A set of attributes of a child node can be specified as follows:
child-node-name={"attribute-name1"=>"attribute-value-1", "attribute-name-2"=>"attribute-value-2", ...}
In the particular case the child node has just a single attribute named "value", this is specified as follows:
child-node-name="some-node-value"
Usage example of the syntax described above:
/subsystem=logging/file-handler=MYHANDLER:add(file={"path"=>"myfile.log", "relative-to"=>"jboss.server.log.dir"}, suffix=".yyyy-MM-dd")
This results in:
<server ...> ... <profile> <subsystem xmlns="urn:jboss:domain:logging:1.5"> ... <file-handler name="MYHANDLER"> <file relative-to="jboss.server.log.dir" path="myfile.log"/> <suffix value=".yyyy-MM-dd"/> </file-handler> ... </subsystem> ... </profile> ... </server>
Adding Attributes to a Newly Added Management Node
Use the :write-attribute(...) operation: