ListSysLogCommand extends Command uses LogDataTrait
Lists all sys_log entries from the last 24 hours by default This is the most basic and can be useful for nightly check test reports.
Table of Contents
Methods
- configure() : mixed
- Configure the command by defining the name, options and arguments
- arrayToLogString() : string
- Converts a one dimensional array to a one line string which can be used for logging or debugging output Example: "loginType: FE; refInfo: Array; HTTP_HOST: www.example.org; REMOTE_ADDR: 192.168.1.5; REMOTE_HOST:; security_level:; showHiddenRecords: 0;"
- execute() : int
- Executes the command for showing sys_log entries
- formatLogDetails() : string
- Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.
- formatLogDetailsStatic() : string
- Static version for ViewHelpers etc.
- unserializeLogData() : array<string|int, mixed>|null
- Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.
Methods
configure()
Configure the command by defining the name, options and arguments
public
configure() : mixed
arrayToLogString()
Converts a one dimensional array to a one line string which can be used for logging or debugging output Example: "loginType: FE; refInfo: Array; HTTP_HOST: www.example.org; REMOTE_ADDR: 192.168.1.5; REMOTE_HOST:; security_level:; showHiddenRecords: 0;"
protected
arrayToLogString(array<string|int, mixed> $arr, array<string|int, mixed> $valueList) : string
Parameters
- $arr : array<string|int, mixed>
-
Data array which should be outputted
- $valueList : array<string|int, mixed>
-
List of keys which should be listed in the output string.
Return values
string —Output string with key names and their value as string
execute()
Executes the command for showing sys_log entries
protected
execute(InputInterface $input, OutputInterface $output) : int
Parameters
- $input : InputInterface
- $output : OutputInterface
Return values
intformatLogDetails()
Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.
protected
formatLogDetails(string $detailString, mixed $substitutes) : string
Parameters
- $detailString : string
- $substitutes : mixed
Return values
stringformatLogDetailsStatic()
Static version for ViewHelpers etc.
protected
static formatLogDetailsStatic(string $detailString, array<string|int, mixed> $substitutes) : string
Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.
Parameters
- $detailString : string
- $substitutes : array<string|int, mixed>
Return values
stringunserializeLogData()
Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.
protected
unserializeLogData(mixed $logData) : array<string|int, mixed>|null
Parameters
- $logData : mixed