class DolLogsCollector extends MessagesCollector (View source)

DolLogsCollector class

Properties

protected string $path
protected int $maxnboflines
protected int $nboflines

Methods

__construct(string $path = null, string $name = 'logs')

Constructor

getWidgets()

Return widget settings

collect()

Return collected data

string
getLogsFile()

Get the path to the logs file

void
getStorageLogs(string $path)

Get logs

string[]
tailFile(string $file, int $lines)

Get latest file lines

list<array{level: string, line: string}>
getLogs(string $file)

Search a string for log entries into the log file. Used when debug bar scan log file (very slow).

array<string, string>
getLevels()

Get the log levels from psr/log.

Details

__construct(string $path = null, string $name = 'logs')

Constructor

Parameters

string $path Path
string $name Name

getWidgets()

Return widget settings

@return array<string,array{icon?:string,indicator?:string,widget?:string,tooltip?:string|array{html:string,class:string},map:string,default:string}> Array

collect()

Return collected data

@return array{count:int,messages:string[]} Array of collected data

string getLogsFile()

Get the path to the logs file

Return Value

string

void getStorageLogs(string $path)

Get logs

Parameters

string $path Path

Return Value

void

protected string[] tailFile(string $file, int $lines)

Get latest file lines

Parameters

string $file File
int $lines Lines

Return Value

string[] Array

list<array{level: string, line: string}> getLogs(string $file)

Search a string for log entries into the log file. Used when debug bar scan log file (very slow).

Parameters

string $file File

Return Value

list<array{level: string, line: string}>

Lines of log entries

array<string, string> getLevels()

Get the log levels from psr/log.

Return Value

array<string, string>

Array of log level