class RoboLogStyle extends LogOutputStyler (View source)

Robo Log Styler.

Constants

TASK_STYLE_SIMULATED

TASK_STYLE_SUCCESS

Methods

__construct(array $labelStyles = [], array $messageStyles = [])

RoboLogStyle constructor.

string
formatMessageByLevel(string $level, string $message, array $context)

Log style customization for Robo: replace the log level with the task name.

string
formatMessage(string $label, string $message, array $context, string $taskNameStyle, string $messageStyle = '')

Log style customization for Robo: add the time indicator to the end of the log message if it exists in the context.

Details

__construct(array $labelStyles = [], array $messageStyles = [])

RoboLogStyle constructor.

Parameters

array $labelStyles
array $messageStyles

protected string formatMessageByLevel(string $level, string $message, array $context)

Log style customization for Robo: replace the log level with the task name.

Parameters

string $level
string $message
array $context

Return Value

string

protected string formatMessage(string $label, string $message, array $context, string $taskNameStyle, string $messageStyle = '')

Log style customization for Robo: add the time indicator to the end of the log message if it exists in the context.

Parameters

string $label
string $message
array $context
string $taskNameStyle
string $messageStyle

Return Value

string