Creating a Logging Configuration for a Host or a Node

You can create a logging configuration for a host or node from the GUI or by using the CLI. Basic Mode and Advanced Mode are available for setting the logging. In Basic Mode, you can choose a log level for the File. In Advanced Mode, you have the option to set up a new appender.

GUI

    Procedure
  1. Click Infrastructure and select Hosts or Nodes. Hosts or Nodes panel appears with a list.
  2. Select a host or node. Details of the host or node displays.

  3. Click Configuration > Logging.
  4. Click Basic Mode or Advanced Mode.

    Mode Procedure

    Basic

    1. Click Add. A row is added to the list.

    2. In the Logger Name column, type a logging configuration name.

    3. Select the FileAppender log level.

    4. Click Save And Apply, or Save, or Revert.

    Advanced

    1. Click Add. A row is added to the list.

    2. In the Logger Name column, type a logging configuration name or select from the list.

    3. In the Additivity column, select an additivity.

    4. Click Set Appender. A row is added to the list.

    5. In the Appender column, select an appender from the list.

    6. In the Level column, select a logging level.

    7. If you want to add a new appender, click New Appender. If not, go to the next step. See Creating a Logging Appender.

    8. Click Apply or Save or Revert.

CLI

    Procedure
  1. In the data file - (host_data.xml or node_data.xml) specify Logger, AppenderRef, and Appender elements.

    <Logger xsi:type="amxdata:Logger" name ="HelloWorldLogger" additivity="false">
    <AppenderRef xsi:type="amxdata:AppenderRef" effectivelevel="INFO">
    <Appender xsi:type="amxdata_reference:LogAppender_reference" name="HelloWorldFileAppender/>
    </AppenderRef>
    </Logger>
    
  2. In the build file - (host_build.xml or node_build.xml) set the action attribute of the AMXAdminTask element to add or set the objectSelector attribute to Path/Logger, where Path is the navigation path to the logger. For example, to set the logging configurations for all application loggers in a data file (host_data.xml or node_data.xml), action is set and objectSelector is Environment/ Application/Logger:

    <AMXAdminTask action="set" objectSelector="Environment/Application/Logger"/>
  3. Invoke the command-line interface on the build file (host_build.xml or node_build.xml) with target name=setLog.