PHP Class Longman\TelegramBot\TelegramLog

Datei anzeigen Open project: akalongman/php-telegram-bot Class Usage Examples

Protected Properties

Property Type Description
$debug_log_path string Path for debug log
$debug_log_temp_stream_handle null Temporary stream handle for debug log
$error_log_path string Path for error log
$monolog Monolog\Logger Monolog instance
$monolog_update Monolog\Logger Monolog instance for update
$update_log_path string Path for update log

Public Methods

Method Description
debug ( string $text ) Report debug log
endDebugLogTempStream ( string $message = '%s' ) Write the temporary debug stream to log and close the stream handle
error ( string $text ) Report error log
getDebugLogTempStream ( ) : mixed Get the stream handle of the temporary debug output
initDebugLog ( string $path ) : Logger Initialize debug log
initErrorLog ( string $path ) : Logger Initialize error log
initUpdateLog ( string $path ) : Logger Initialize update log
initialize ( Logger $external_monolog = null ) : Logger Initialize
isDebugLogActive ( ) : boolean Is debug log active
isErrorLogActive ( ) : boolean Is error log active
isUpdateLogActive ( ) : boolean Is update log active
update ( string $text ) Report update log

Method Details

debug() public static method

Report debug log
public static debug ( string $text )
$text string

endDebugLogTempStream() public static method

Write the temporary debug stream to log and close the stream handle
public static endDebugLogTempStream ( string $message = '%s' )
$message string Message (with placeholder) to write to the debug log

error() public static method

Report error log
public static error ( string $text )
$text string

getDebugLogTempStream() public static method

Get the stream handle of the temporary debug output
public static getDebugLogTempStream ( ) : mixed
return mixed The stream if debug is active, else false

initDebugLog() public static method

Initialize debug log
public static initDebugLog ( string $path ) : Logger
$path string
return Monolog\Logger

initErrorLog() public static method

Initialize error log
public static initErrorLog ( string $path ) : Logger
$path string
return Monolog\Logger

initUpdateLog() public static method

Initilize monolog instance. Singleton Is possbile provide an external monolog instance
public static initUpdateLog ( string $path ) : Logger
$path string
return Monolog\Logger

initialize() public static method

Initilize monolog instance. Singleton Is possbile provide an external monolog instance
public static initialize ( Logger $external_monolog = null ) : Logger
$external_monolog Monolog\Logger
return Monolog\Logger

isDebugLogActive() public static method

Is debug log active
public static isDebugLogActive ( ) : boolean
return boolean

isErrorLogActive() public static method

Is error log active
public static isErrorLogActive ( ) : boolean
return boolean

isUpdateLogActive() public static method

Is update log active
public static isUpdateLogActive ( ) : boolean
return boolean

update() public static method

Report update log
public static update ( string $text )
$text string

Property Details

$debug_log_path protected_oe static_oe property

Path for debug log
protected static string $debug_log_path
return string

$debug_log_temp_stream_handle protected_oe static_oe property

Temporary stream handle for debug log
protected static null $debug_log_temp_stream_handle
return null

$error_log_path protected_oe static_oe property

Path for error log
protected static string $error_log_path
return string

$monolog protected_oe static_oe property

Monolog instance
protected static Logger,Monolog $monolog
return Monolog\Logger

$monolog_update protected_oe static_oe property

Monolog instance for update
protected static Logger,Monolog $monolog_update
return Monolog\Logger

$update_log_path protected_oe static_oe property

Path for update log
protected static string $update_log_path
return string