Define a Write to Log Action

Use the Write to Log Action to create a custom log when a One-Step Action is run. The log includes content defined in the Write to Log Action, along with information based on the log level defined in the Action.

The process or client used to run the One-Step Action determines the log location. For example, when a One-Step Action that includes a Write to Log Action is run from the Desktop Client, Desktop Client logging options are used. When a Simple Action/Event Automation Process that includes a Write to Log Action is run, the log is written to the Automation Process Service log.

Good to Know

  • If you log to a file, Users running the One-Step Action must have permissions to access and write to the specified file and location.
  • The One-Step Action log level should be at the same level or above the level of the service or client log level. If the log level is lower, the log is not created for the One-Step Action. For example, if the service or client log level is set to warning and above, you can set the One-Step Action log level to warning, error, or fatal.
  • If the content of the Write to Log Action is too large, the machine running the Action may become unresponsive. Solve this problem by limiting the content added to the Write to Log Action.

To define a Write to Log Action for a One-Step Action:

  1. Open the One-Step Editor.
  2. Add a Write to log Action to the Designer Board.
  3. Define properties for the Write to Log Action:
    Option Description
    Name Provide a display name for the Action.
    Log Level Select a log level:
    • Debug: Very verbose messages. This level is space and resource intensive.

      For best results, log Debug messages (Debug and above) to a file or to Splunk, and NOT to an event log. CSM logs numerous Debug messages, so a log would be slow and might require more resources.

    • Stats: Detailed messages that track performance.
    • Info: Informational messages that can be used to diagnose a problem.
    • Warning: Warning messages that occurred.
    • Error: Errors that were encountered.
    • Fatal only: Errors that caused the service or process to stop.
    Contents Add content to the log. You can manually enter text or right-click to insert Tokens (example: Fields, System Functions, Prompts, Expressions, Stored Values, Metrics, and Counters).
  4. Define the Annotations for a One-Step Action.
  5. Select Save.