Logging Overview
  • Updated on 10 Apr 2019
  • 3 minutes to read
  • Print
  • Dark
    Light

Logging Overview

  • Print
  • Dark
    Light

Overview

This tutorial demonstrates how to write into the Log file, manage Logs , and create custom categories for logs. You can use the Log stepin the Decisions Flow Designer for debugging purposes. This step can be found in the Flow Designer under Flow Management > Debugging .


Example:

In this example, create a simple Flow with a Log step.
In a Designer Folder begin by clicking Create Flow button on the Folder Actions Panel.
Then, Name the Flow and click Create to proceed to the Flow Designer.
2018-08-30_151315.jpg

In the Flow Designer, add a Log step from the Flow Management > Debugging category.
2018-08-30_152546.jpg

Connect the Log step to the End Step in our Flow. Click the Log step, then on the right side click the Properties tab.

The Type setting lets you configure a log level in descending order of importance: Debug, Info, Warn, Error, Fatal. By default the tool displays only the Warn, Error, and Fatal types under System > Administration > System Tools > Logging. For testing purposes, set the Type to Fatal.
The default logging type is Warn

2018-08-30_152901.jpg

TheCategory setting lets you set a category for your logs for easy identification. Often, best practice is to use the name of your Flow or project for the log category.
In the log viewer, Level and Category appear as follows:
2018-08-30_153230.jpg

UnderInputs, the Value property lets you configure the contentof this Log. It can be either a constant value or dynamic data from the Flow . In this example use the setting Text Merge.Plain and click Show Editor to compose the text.
2018-08-30_153354.jpg

In the Merge Text Editor compose a simple message and add the FlowTrackingId value from Flow Data . Click SAVE to save and continue.
2018-08-30_153528.jpg

Save and close the Flow Designer.
Back in the Designer Folder, right-click the Flow and click Run Flow to run it.
To check the log, click System > Administration > System Tools > Logging.
2018-08-30_154033.jpg

The log is also written to the file system in  C:\Program Files\Decisions\Decisions Services Manager\Logs\Primary.txt (Note: the location may be different in the file system if you did not use default Decisions installation).
2017-02-10_165842.png

Open Primary Log file, find the Message from the Log step.
2017-02-10_170126.png

A custom category file is also created by default. Log Categories are powerful in organizing Log messages. Categories can be configured and created in the LogCategorySettings file that is located in *C:\Program Files\Decisions\Decisions Services Manager* folder.
2017-02-15_124338.png

In the LogCategorySettings file, notice a new category has been automatically created. The name of this category was set in the Properties tab of the Log step in our flow. In this file manually set the Log Levels or set logs in this category to be written to the separate file (changing the LogToOwnFileName from false totrue).
2017-02-15_125122.png

For this example enable the new category to write to the separate file. (Note, you may need to change permissions settings to modify and save this file.)
2017-02-15_130049.png

To test this, return back to the Portal and run our Flow. To do this, right-click on the flow and click Run Flow.
2018-08-30_154451.jpg

Once the flow has run, navigate to the C:\Program Files\Decisions\Decisions Services Manager\Logs folder and locate ‘Logging Overview Flow’ log file that was created with the Log step in our Flow .
2017-02-15_131532.png

This file contains the Log message that was in the Primary log file previously.
2017-02-15_131629.png

Global logging settings can be configured in Settings.xml file that is located in *C:\Program Files\Decisions\Decisions Services Manager* folder.
2017-02-15_131846.png

You can also change logging settings in the Portal under System > Administration > System Tools > Logging . This folder contains the Server Log Viewer and Client Log Viewer.
To change logging settings on this folder, right-click and click Server Log Categories > Enable/Disable .
2018-08-30_154700.jpg

Was this article helpful?