Saryu Shah | f96ef83 | 2019-06-03 16:23:04 +0000 | [diff] [blame^] | 1 | |
| 2 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 3 | .. http://creativecommons.org/licenses/by/4.0 |
| 4 | |
| 5 | *************************** |
| 6 | Feature: Controller Logging |
| 7 | *************************** |
| 8 | |
| 9 | .. contents:: |
| 10 | :depth: 3 |
| 11 | |
| 12 | Summary |
| 13 | ^^^^^^^ |
| 14 | The controller logging feature provides a way to log network topic messages to a separate controller log file for each controller. This allows a clear separation of network traffic between all of the controllers. |
| 15 | |
| 16 | Enabling Controller Logging |
| 17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 18 | |
| 19 | Type "features enable controller-logging". The feature will now display as "enabled". |
| 20 | |
| 21 | .. image:: ctrlog_enablefeature.png |
| 22 | |
| 23 | When the feature's enable script is executed, it will search the $POLICY_HOME/config directory for any logback files containing the prefix "logback-include-". These logger configuration files are typically provided with a feature that installs a controlloop (ex: controlloop-amsterdam and controlloop-casablanca features). Once these configuration files are found by the enable script, the logback.xml config file will be updated to include the configurations. |
| 24 | |
| 25 | .. image:: ctrlog_logback.png |
| 26 | |
| 27 | |
| 28 | Controller Logger Configuration |
| 29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 30 | |
| 31 | The contents of a logback-include-``*``.xml file follows the same configuration syntax as the logback.xml file. It will contain the configurations for the logger associated with the given controller. |
| 32 | |
| 33 | .. note:: A controller logger MUST be configured with the same name as the controller (ex: a controller named "casablanca" will have a logger named "casablanca"). |
| 34 | |
| 35 | .. image:: ctrlog_config.png |
| 36 | |
| 37 | |
| 38 | Viewing the Controller Logs |
| 39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 40 | |
| 41 | Once a logger for the controller is configured, start the drools-pdp and navigate to the $POLICY_LOGS directory. A new controller specific network log will be added that contains all the network topic traffic of the controller. |
| 42 | |
| 43 | .. image:: ctrlog_view.png |
| 44 | |
| 45 | The original network log remains and will append traffic information from all topics regardless of which controller it is for. To abbreviate and customize messages for the network log, refer to the `Feature MDC Filters <feature_mdcfilters.html>`_ documentation. |
| 46 | |
| 47 | |
| 48 | End of Document |
| 49 | |
| 50 | |