PHP Class CI_Log, TastyIgniter

see https://github.com/stevethomas/codeigniter-monolog & https://github.com/Seldaek/monolog
Afficher le fichier Open project: tastyigniter/tastyigniter Class Usage Examples

Protected Properties

Свойство Type Description
$_date_fmt string Format of timestamp for log files
$_enabled boolean Whether or not the logger can write to the log files
$_file_ext string Filename extension
$_file_permissions integer File permissions
$_levels array Predefined logging levels
$_log_path string Path to save log files
$_threshold integer Level of logging
$_threshold_array array Array of threshold levels to log

Méthodes publiques

Méthode Description
__construct ( ) : void Class constructor
write_log ( string $level, string $msg ) : boolean Write Log File

Méthodes protégées

Méthode Description
_format_line ( string $level, string $date, $message ) : string Format the log line.

Method Details

__construct() public méthode

Class constructor
public __construct ( ) : void
Résultat void

_format_line() protected méthode

This is for extensibility of log formatting If you want to change the log format, extend the CI_Log class and override this method
protected _format_line ( string $level, string $date, $message ) : string
$level string The error level
$date string Formatted date string
Résultat string Formatted log line with a new line character '\n' at the end

write_log() public méthode

Generally this function will be called using the global log_message() function
public write_log ( string $level, string $msg ) : boolean
$level string The error level: 'error', 'debug' or 'info'
$msg string The error message
Résultat boolean

Property Details

$_date_fmt protected_oe property

Format of timestamp for log files
protected string $_date_fmt
Résultat string

$_enabled protected_oe property

Whether or not the logger can write to the log files
protected bool $_enabled
Résultat boolean

$_file_ext protected_oe property

Filename extension
protected string $_file_ext
Résultat string

$_file_permissions protected_oe property

File permissions
protected int $_file_permissions
Résultat integer

$_levels protected_oe property

Predefined logging levels
protected array $_levels
Résultat array

$_log_path protected_oe property

Path to save log files
protected string $_log_path
Résultat string

$_threshold protected_oe property

Level of logging
protected int $_threshold
Résultat integer

$_threshold_array protected_oe property

Array of threshold levels to log
protected array $_threshold_array
Résultat array