Skip to content

FileLogger

Properties

filenameFormat

Date format of the log filename.

protected string $filenameFormat

filenameExtension

Extension of the log file.

protected string $filenameExtension

logFormat

protected ?\Qubus\Log\Format $logFormat

logFilename

protected ?\Qubus\Log\Filename $logFilename

filesystem

public \League\Flysystem\FilesystemOperator $filesystem

threshold

public string|\Psr\Log\LogLevel $threshold

Methods

__construct

public __construct(\League\Flysystem\FilesystemOperator $filesystem, string|\Psr\Log\LogLevel $threshold, array $params = []): mixed

Parameters:

Parameter Type Description
$filesystem \League\Flysystem\FilesystemOperator Flysystem filesystem abstraction
$threshold string|\Psr\Log\LogLevel Lowest level of logging to write
$params array

Throws:


log

public log(string|\Psr\Log\LogLevel $level, string|\Stringable $message, array $context = []): void

Parameters:

Parameter Type Description
$level string|\Psr\Log\LogLevel
$message string|\Stringable
$context array

Throws:


setFilenameFormat

Set the log filename format using PHP's date parameters.

public setFilenameFormat(string $filenameFormat): void

Parameters:

Parameter Type Description
$filenameFormat string

See Also:

  • https://secure.php.net/manual/en/function.date.php -

setFilenameExtension

Set the filename extension. Ex: 'log' will be '.log'.

public setFilenameExtension(string $filenameExtension): void

Parameters:

Parameter Type Description
$filenameExtension string

setLogFormat

Optionally create your own Format class and set it to be used instead.

public setLogFormat(\Qubus\Log\Format $logFormat): void

Parameters:

Parameter Type Description
$logFormat \Qubus\Log\Format

setLogFilename

Optionally create your own Filename class and use this method to use it.

public setLogFilename(\Qubus\Log\Filename $logFilename): void

Parameters:

Parameter Type Description
$logFilename \Qubus\Log\Filename

Inherited methods

__construct

public __construct(array $params = []): mixed

Parameters:

Parameter Type Description
$params array

Throws:


isAvailable

public isAvailable(mixed $level): bool

Parameters:

Parameter Type Description
$level mixed

getDate

protected getDate(): string

stringify

protected stringify(array $data = []): string

Parameters:

Parameter Type Description
$data array

interpolate

protected interpolate(mixed $message, array $context = []): string

Parameters:

Parameter Type Description
$message mixed
$context array

__get

public __get(mixed $name): mixed

Parameters:

Parameter Type Description
$name mixed

Throws:


__set

public __set(mixed $name, mixed $value): mixed

Parameters:

Parameter Type Description
$name mixed
$value mixed

Throws:


__isset

public __isset(mixed $name): bool

Parameters:

Parameter Type Description
$name mixed


Automatically generated on 2025-10-13