Add: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 63: 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>
            <suffix value=".yyyy-MM-dd"/>
             ...
             ...
         </subsystem>
         </subsystem>
Line 77: Line 77:
Use the <tt>:write-attribute(...)</tt> operation:
Use the <tt>:write-attribute(...)</tt> operation:


[[Write-attribute#Syntax|:write-attribute(...)]]
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;">
:[[Write-attribute#Syntax|:write-attribute(...)]]
</blockquote>


=Examples=
=Examples=


* [[WildFly_Logging_Subsystem_CLI_Configuration#Adding_a_Periodic_Rotating_File_Log_Handler|Adding a WildFly Logging System Log Handler]]
* [[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:

:write-attribute(...)

Examples