####### Logging ####### The Snippet Framework includes logging as a standard feature that was designed to help troubleshoot issues easily. It is execution-aware which enables the Snippet Framework to determine when it is appropriate to log to the file system or the console. It also enables targeted debug through Log Policies which enables pin-pointing logging during standard collections. ********************* Reading a log message ********************* A Snippet Framework log message contains information that helps identify where it came from. This can be useful during debugging to more quickly troubleshoot an issue. A Snippet Framework log message may contain the following information: .. list-table:: Log Format Definitions :widths: 30 70 :header-rows: 1 * - Log Message Variable - Description * - time - Local time of the log message * - unique_id - Unique identifier of the current Snippet Framework execution * - module - Module that called the log statement * - lineno - line number within the module that called the log statement * - log_level - Level of log message (debug, info, etc) * - message - Message from the log statement Some messages will be context-aware to help track the lifecycle of the collection and allow for more targeted debug. A context-aware message contains ``[a:,d:,c:,s:]`` as part of its message. .. list-table:: Context-Aware Definitions :widths: 25 75 :header-rows: 1 * - Character - Named Value * - a - Application ID * - d - Device ID * - c - Collection ID * - s - Step Name Assuming you had the following context-aware information, ``[a:1006,d:4,c:10231,s:http]``, you would be able to know the following information: .. list-table:: Header Example :widths: 25 75 :header-rows: 1 * - Header Portion - Definition * - a:1006 - Dynamic Application: 1006 * - d:4 - Device: 4 * - c:10231 - Collection Object: 10231 * - s:http - Step: http .. _logging_uidebug: ******* UIDebug ******* UIDebug provides instant feedback for debugging a collection or Dynamic Application. This is helpful when developing a Snippet Framework based Dynamic Application or trying to troubleshoot a problem. Running in UIDebug will inform the Snippet Framework to run in debug mode, regardless of :ref:`Log Policies `. UIDebug outputs all log messages with the format: ``