Create Log Entry
Component definition
This component creates a log entry that includes log level (debug, error, fatal, info, warn), and user-defined text. You can view the log entries that the Create Log Entry component creates in the Configuration and Logging Tool under the Log Viewer tab.
Component icon
Description of component output paths
Unknown
The component output paths are described in the following table:
Property |
Description |
Unknown
|
Unknown
|
Unknown
|
Unknown
|
Description of component tabs and their properties
The properties on the Configuration tab in the Create Log Entry component are listed and described in the following table:
The properties on the Settings tab in the Create Log Entry component are listed and described in the following table:
Connection information
Not applicable
Component settings
Unknown
Use cases
Here is one example use for the Create Log Entry component:
Broken email
Scenario: If the amount of disk space gets too low, an email is sent to the server administrator with a low disk space warning. If the email fails to send, the process creates a log entry instead.
Process: This process is created as a Monitoring Project type.
The following screen shot shows the process:
A GetComputerInfo component checks a server and returns the information to the process. A Number Range Rule component checks the remaining disk space and takes action if the disk space is low. Depending on how low the disk space is, one of two emails is sent to the server administrator.
If the emails fail, the server administrator has no way of knowing that the server is about to run out of disk space.
An Exception Trigger by Components component watches the email components for failure. If one fails, an exception is triggered and the workflow jumps to the exception component.
Before a log entry can be created, the Create Log Entry component needs to have access to process data from the GetComputerInfo component. Because the Create Log Entry component is not downstream from this component, it cannot see its data. The Variables Exist component makes this data available to the log component.
The following screen shot shows the Create Log Entry editor looks like:
Here we see the Create Log Entry editor and its text editor. The log message contains process variables from the GetComputerInfo component, showing how much disk space remains on the server. This message appears in the Configuration and Logging Tool after the entry is created. Access the tool at Start > Programs > Altiris > Workflow Designer > Tools > Workflow Explorer.
Other components in this example are as follows:
For more information on logging, see the Workflow Solution Administrator's Guide.
www.altiris.com/support/documentation.aspx
When you run a Project in the debugger, you can see the progress and diagnose any problem areas or components. When you publish a Project, you cannot see the process running. Logging components help you "see" your process running by logging successful or unsuccessful steps along the way. You can view these logs in the Configuration and Logging Tool at Start > Programs > Symantec > Workflow > Workflow Designer > Tools > Workflow Explorer.
Other usage ideas
-
Monitoring Project check
A Monitoring Project runs each morning on a schedule and is set to notify someone if an error occurs. To show that it is still running successfully when errors do occur, the process creates an info-level log message each time it runs. This log shows up in the Workflow Explorer Configuration and Logging Tool. The person responsible for the Monitoring Project can check the Log Viewer each morning to ensure that the process is still running correctly.
-
Second-option notification
A company does not want to risk having a website go down. A Monitoring Project is set up to switch to a second-option server if the main server goes down. Because this switch happens automatically, the network administrator may not immediately know that the main server has gone down. A Create Log Entry is included in the Monitoring Project to create a log entry if the server-switch happens.
This idea can also be adapted to fit other second-option situations,. For example, to contact a specific person, or to use constant data instead of dynamic data from a database.