Documentation

TelegramLog
in package

Table of Contents

$debug_log_path  : string
Path for debug log
$debug_log_temp_stream_handle  : resource|null
Temporary stream handle for debug log
$error_log_path  : string
Path for error log
$monolog  : Logger
Monolog instance
$monolog_update  : Logger
Monolog instance for update
$update_log_path  : string
Path for update log
debug()  : mixed
Report debug log
endDebugLogTempStream()  : mixed
Write the temporary debug stream to log and close the stream handle
error()  : mixed
Report error log
getDebugLogTempStream()  : mixed
Get the stream handle of the temporary debug output
initDebugLog()  : Logger
Initialize debug log
initErrorLog()  : Logger
Initialize error log
initialize()  : Logger
Initialize Monolog Logger instance, optionally passing an existing one
initUpdateLog()  : Logger
Initialize update log
isDebugLogActive()  : bool
Is debug log active
isErrorLogActive()  : bool
Is error log active
isUpdateLogActive()  : bool
Is update log active
update()  : mixed
Report update log
getLogText()  : string
Applies vsprintf to the text if placeholder replacements are passed along.

Properties

$debug_log_path

Path for debug log

protected static string $debug_log_path

$debug_log_temp_stream_handle

Temporary stream handle for debug log

protected static resource|null $debug_log_temp_stream_handle

$error_log_path

Path for error log

protected static string $error_log_path

$monolog_update

Monolog instance for update

protected static Logger $monolog_update

$update_log_path

Path for update log

protected static string $update_log_path

Methods

debug()

Report debug log

public static debug(string $text) : mixed
Parameters
$text : string
Return values
mixed

endDebugLogTempStream()

Write the temporary debug stream to log and close the stream handle

public static endDebugLogTempStream([string $message = '%s' ]) : mixed
Parameters
$message : string = '%s'

Message (with placeholder) to write to the debug log

Return values
mixed

error()

Report error log

public static error(string $text) : mixed
Parameters
$text : string
Return values
mixed

getDebugLogTempStream()

Get the stream handle of the temporary debug output

public static getDebugLogTempStream() : mixed
Return values
mixed

The stream if debug is active, else false

initDebugLog()

Initialize debug log

public static initDebugLog(string $path) : Logger
Parameters
$path : string
Tags
throws
TelegramLogException
throws
InvalidArgumentException
throws
Exception
Return values
Logger

initErrorLog()

Initialize error log

public static initErrorLog(string $path) : Logger
Parameters
$path : string
Tags
throws
TelegramLogException
throws
InvalidArgumentException
throws
Exception
Return values
Logger

initialize()

Initialize Monolog Logger instance, optionally passing an existing one

public static initialize([Logger $external_monolog = null ]) : Logger
Parameters
$external_monolog : Logger = null
Return values
Logger

initUpdateLog()

Initialize update log

public static initUpdateLog(string $path) : Logger
Parameters
$path : string
Tags
throws
TelegramLogException
throws
InvalidArgumentException
throws
Exception
Return values
Logger

isDebugLogActive()

Is debug log active

public static isDebugLogActive() : bool
Return values
bool

isErrorLogActive()

Is error log active

public static isErrorLogActive() : bool
Return values
bool

isUpdateLogActive()

Is update log active

public static isUpdateLogActive() : bool
Return values
bool

update()

Report update log

public static update(string $text) : mixed
Parameters
$text : string
Return values
mixed

getLogText()

Applies vsprintf to the text if placeholder replacements are passed along.

protected static getLogText(string $text[, array<string|int, mixed> $args = [] ]) : string
Parameters
$text : string
$args : array<string|int, mixed> = []
Return values
string

Search results