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 and Jms
appender. In Advanced Mode, you have the option to set up a new appender.
GUI
Procedure
-
Click
Infrastructure and select Hosts or Nodes.
Hosts or Nodes panel appears with a list.
-
Select a host or node.
Details of the host or node displays.
-
Click
Configuration >
Logging.
-
Click
Basic Mode or
Advanced Mode.
| Mode |
Procedure |
|
Basic
|
- Click
Add. A row is added to the list.
- In the Logger
Name column, type a logging configuration name.
- Select the
FileAppender log level.
- Select
JmsAppender log level.
- Click
Save And Apply, or
Save, or
Revert.
|
|
Advanced
|
- Click
Add. A row is added to the list.
- In the Logger
Name column, type a logging configuration name or select from the list.
- In the Addivity
column, select an additivity.
- Click
Set Appender. A row is added to the
list.
- In the Appender
column, select an appender from the list.
- In the Level
column, select a logging level.
- If you want to
add a new appender, click New Appender. If not, go to the next step. See
Creating a Logging Appender.
- Click
Apply or Save
or
Revert.
|
CLI
Procedure
-
In the data file 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>
-
In the build file set the
action attribute of the
AMXAdminTask element to add or set and 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,
action is
set and
objectSelector is
Environment/Application/Logger:
<AMXAdminTask action="set" objectSelector="Environment/Application/Logger"/>
-
Invoke the command-line interface
on the build file.
Copyright © TIBCO Software Inc. All Rights Reserved.