Rebornbuddy
Loading...
Searching...
No Matches
ff14bot.Behavior.FailLogger Class Reference

A composite node that logs a message and returns failure status. More...

Inheritance diagram for ff14bot.Behavior.FailLogger:

Public Member Functions

 FailLogger (ValueRetriever< string > data, LogLevel level)
 Creates a new FailLogger that logs the specified message at the given log level.
 FailLogger (ValueRetriever< string > data)
 Initializes a new instance of the FailLogger class with the specified data retriever.

Protected Member Functions

override IEnumerable< RunStatus > Execute (object context)
 Executes this node, logging the message and returning failure.

Detailed Description

A composite node that logs a message and returns failure status.

Constructor & Destructor Documentation

◆ FailLogger() [1/2]

ff14bot.Behavior.FailLogger.FailLogger ( ValueRetriever< string > data,
LogLevel level )

Creates a new FailLogger that logs the specified message at the given log level.

Parameters
dataThe message to log
levelThe log level to use

◆ FailLogger() [2/2]

ff14bot.Behavior.FailLogger.FailLogger ( ValueRetriever< string > data)

Initializes a new instance of the FailLogger class with the specified data retriever.

Parameters
dataA function that retrieves the message to be logged when the node fails.

This constructor sets the default log level to LogLevel.Normal.

Member Function Documentation

◆ Execute()

override IEnumerable< RunStatus > ff14bot.Behavior.FailLogger.Execute ( object context)
protected

Executes this node, logging the message and returning failure.

Parameters
contextThe context to execute with
Returns
Always returns RunStatus.Failure