phpDocumentor

GzipHandler extends StreamHandler
in package

Class GzipHandler

Tags
codeCoverageIgnore

Table of Contents

$maxLogfileSize  : int
__construct()  : mixed
GzipHandler constructor.
write()  : void
isJsonLogfile()  : bool
logfileDoesNotExist()  : bool
logfileIsEmpty()  : bool
prepareLogfileForAppending()  : void
prepareRecord()  : string
prepareRecordForFirstWriteInLogfile()  : string
removeLinebreakAtEndOfString()  : string

Properties

Methods

__construct()

GzipHandler constructor.

public __construct(string $logfile[, int $level = Logger::DEBUG ][, bool $bubble = true ][, int|null $filePermission = null ][, bool $useLocking = false ][, int $maxLogfileSize = 1024 * 1024 ]) : mixed
Parameters
$logfile : string

Path for the logfile

$level : int = Logger::DEBUG

The minimum logging level at which this handler will be triggered

$bubble : bool = true

Whether the messages that are handled can bubble up the stack or not

$filePermission : int|null = null

Optional file permissions (default (0644) are only for owner read/write)

$useLocking : bool = false

Try to lock log file before doing any writes

$maxLogfileSize : int = 1024 * 1024

Max file size for log files in bytes

Tags
throws
Exception

If a missing directory is not buildable

Return values
mixed

write()

protected write(array<string|int, mixed> $record) : void
Parameters
$record : array<string|int, mixed>
Return values
void

isJsonLogfile()

private isJsonLogfile() : bool
Return values
bool

logfileDoesNotExist()

private logfileDoesNotExist() : bool
Return values
bool

logfileIsEmpty()

private logfileIsEmpty() : bool
Return values
bool

prepareLogfileForAppending()

private prepareLogfileForAppending() : void
Return values
void

prepareRecord()

private prepareRecord(string $record) : string
Parameters
$record : string
Return values
string

prepareRecordForFirstWriteInLogfile()

private prepareRecordForFirstWriteInLogfile(string $record) : string
Parameters
$record : string
Return values
string

removeLinebreakAtEndOfString()

private removeLinebreakAtEndOfString(string $string) : string
Parameters
$string : string
Return values
string

Search results