class LogManager

Traits

ParsesLogConfiguration

Constants

LEVELS

Available log levels.

Properties

protected array $channel

The default logging channel.

Methods

__construct()

Create a new instance.

bool
isFile()

Determine whether logs are written to files.

array
getLogFilenames()

Get the filenames of the logfiles.

string
getLogFileContent(string $filename)

Get the content of a logfile.

bool
isRedis()

Determine whether logs are written to files.

Collection
getRedisLogMessages(string $level = 'debug', string|null $search = null)

Get the log messages.

bool
messageContains(array $message, string $search)

Determine whether a log message contains the search term.

int
getRecentCount(string $level = 'debug', int $subDays = 1)

Get the number of log messages of the last day(s).

string
getFallbackChannelName()

Get fallback log channel name.

Details

at line 41
__construct()

Create a new instance.

at line 52
bool isFile()

Determine whether logs are written to files.

Return Value

bool

at line 62
array getLogFilenames()

Get the filenames of the logfiles.

Return Value

array

at line 78
string getLogFileContent(string $filename)

Get the content of a logfile.

Parameters

string $filename

Return Value

string

at line 90
bool isRedis()

Determine whether logs are written to files.

Return Value

bool

at line 104
Collection getRedisLogMessages(string $level = 'debug', string|null $search = null)

Get the log messages.

Parameters

string $level

Minimum log level.

string|null $search

Case-insensitive search term.

Return Value

Collection

at line 130
protected bool messageContains(array $message, string $search)

Determine whether a log message contains the search term.

Parameters

array $message
string $search

Return Value

bool

at line 159
int getRecentCount(string $level = 'debug', int $subDays = 1)

Get the number of log messages of the last day(s).

Parameters

string $level

Minimum log level.

int $subDays

Number of days to go back.

Return Value

int

at line 197
protected string getFallbackChannelName()

Get fallback log channel name.

Return Value

string