Documentation

rex_log_file
in package
implements Iterator Uses rex_factory_trait

Log file class.

Tags
author

gharlan

implements

Iterator<int, rex_log_entry>

Table of Contents

Interfaces

Iterator

Methods

__construct()  : mixed
add()  : void
Adds a log entry.
current()  : rex_log_entry
delete()  : bool
Deletes a log file and its rotations.
factory()  : static
key()  : int|null
next()  : mixed
Reads the log file backwards line by line (each call reads one line).
rewind()  : mixed
valid()  : mixed

Methods

__construct()

public __construct(string $path[, int|null $maxFileSize = null ]) : mixed
Parameters
$path : string

File path

$maxFileSize : int|null = null

Maximum file size

Tags
deprecated

since 5.17.0, use rex_log_file::factory instead

add()

Adds a log entry.

public add(array<int, string|int> $data) : void
Parameters
$data : array<int, string|int>

Log data

delete()

Deletes a log file and its rotations.

public static delete(string $path) : bool
Parameters
$path : string

File path

Return values
bool

factory()

public static factory(string $path[, int|null $maxFileSize = null ]) : static
Parameters
$path : string
$maxFileSize : int|null = null
Return values
static

key()

public key() : int|null
Return values
int|null

next()

Reads the log file backwards line by line (each call reads one line).

public next() : mixed

        
On this page

Search results