log

package module
v0.0.0-...-d725791 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

README

Log

This activity allows you to write log messages.

Installation

Flogo CLI
flogo install github.com/project-flogo/contrib/activity/log

Configuration

Input:
Name Type Description
message string The message to log
addDetails bool Append contextual execution information to the log message
usePrint bool Use Print to stdout instead of the built-in Logger. The built-in logger may not be compatible with some cloud environments.

Examples

The below example logs a message 'test message':

{
  "id": "log_message",
  "name": "Log Message",
  "activity": {
    "ref": "github.com/project-flogo/contrib/activity/log",
    "input": {
      "message": "test message",
      "addDetails": "false"
    }
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
}

Activity is an Activity that is used to log a message to the console inputs : {message, flowInfo} outputs: none

func (*Activity) Eval

func (a *Activity) Eval(ctx activity.Context) (done bool, err error)

Eval implements api.Activity.Eval - Logs the Message

func (*Activity) Metadata

func (a *Activity) Metadata() *activity.Metadata

Metadata returns the activity's metadata

type Input

type Input struct {
	Message    string `md:"message"`    // The message to log
	AddDetails bool   `md:"addDetails"` // Append contextual execution information to the log message
	UsePrint   bool   `md:"usePrint"`
}

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

func (*Input) ToMap

func (i *Input) ToMap() map[string]interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL