final class WatchdogTailCommand extends Command (View source)

Traits

A copy of \Drupal\Core\DependencyInjection\AutowireTrait with first params' type hint changed.

Constants

NAME

Properties

protected Connection $connection from  WatchdogTrait
protected LoggerInterface $logger from  WatchdogTrait

Methods

static 
create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

array
where(string|null $type = null, $severity = null, string|null $filter = null, string $criteria = 'AND', int|string|null $severity_min = null)

Build a WHERE snippet based on given parameters.

formatResult(stdClass $result, bool $extended = false)

Format a watchdog database row.

static array
messageTypes()

Helper function to obtain the message types based on drupal version.

__construct(Connection $connection, LoggerInterface $logger)

No description

void
configure()

No description

int
execute(InputInterface $input, OutputInterface $output)

No description

void
complete(CompletionInput $input, CompletionSuggestions $suggestions)

No description

Details

static create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

Parameters

ContainerInterface $container

The service container this instance should use.

protected array where(string|null $type = null, $severity = null, string|null $filter = null, string $criteria = 'AND', int|string|null $severity_min = null)

Build a WHERE snippet based on given parameters.

Example: ('where' => string, 'args' => [])

Parameters

string|null $type

String. Valid watchdog type.

$severity

Int or String for a valid watchdog severity message.

string|null $filter

String. Value to filter watchdog messages by.

string $criteria

('AND', 'OR'). Criteria for the WHERE snippet.

int|string|null $severity_min

Int or String for the minimum severity to return.

Return Value

array

protected stdClass formatResult(stdClass $result, bool $extended = false)

Format a watchdog database row.

Parameters

stdClass $result

A database result object.

bool $extended

Return extended message details.

Return Value

stdClass

The result object with some attributes themed.

static array messageTypes()

Helper function to obtain the message types based on drupal version.

Return Value

array

Array of watchdog message types.

__construct(Connection $connection, LoggerInterface $logger)

No description

Parameters

Connection $connection
LoggerInterface $logger

protected void configure()

No description

Return Value

void

protected int execute(InputInterface $input, OutputInterface $output)

No description

Parameters

InputInterface $input
OutputInterface $output

Return Value

int

void complete(CompletionInput $input, CompletionSuggestions $suggestions)

No description

Parameters

CompletionInput $input
CompletionSuggestions $suggestions

Return Value

void