GRIS_LOGGER
in package
Class for debugging and logfiles
With this class errors, warnings and information can be written into a file or sent ta an administrator by mail
PHP version 7
Copyright (c) 2012, Holger Heuser, GESIS Leibniz Institute for the Social Sciences Unter Sachsenhausen 6-8 50667 Cologne, Germany
Tags
Table of Contents
- $filename : string
- The filename for the errorlog
- $language_filename : string
- The filename for the language log
- $handle : string
- The handle for the file
- $language_handle : string
- The handle for the language file
- $log_items : array<string|int, mixed>
- The items to log (from init)
- __construct() : mixed
- The class constructor
- __destruct() : mixed
- The class desstructor
- clear_log() : bool
- Deletes all entries from the logfile
- get() : array<string|int, mixed>
- Returns the current the logfile
- set() : bool
- Writes debug message to the logfile
Properties
$filename
The filename for the errorlog
protected
string
$filename
Tags
$language_filename
The filename for the language log
protected
string
$language_filename
Tags
$handle
The handle for the file
private
string
$handle
Tags
$language_handle
The handle for the language file
private
string
$language_handle
Tags
$log_items
The items to log (from init)
private
array<string|int, mixed>
$log_items
Tags
Methods
__construct()
The class constructor
public
__construct() : mixed
Initializes the logfile
Return values
mixed —__destruct()
The class desstructor
public
__destruct() : mixed
Closes the logfile
Return values
mixed —clear_log()
Deletes all entries from the logfile
public
clear_log() : bool
Return values
bool —true
get()
Returns the current the logfile
public
get([string $type = NULL ]) : array<string|int, mixed>
Parameters
- $type : string = NULL
-
The entry type (leave empty for the complete file)
Return values
array<string|int, mixed> —An array of lines (type, timestamp, message)
set()
Writes debug message to the logfile
public
set(string $log_group, string $message) : bool
Parameters
- $log_group : string
-
The group of debug messages
- $message : string
-
The debug messages
Return values
bool —true