Documentation

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
copyright

Copyright (c) 2012, Holger Heuser, GESIS Leibniz Institute for the Social Sciences

link

GESIS Leibniz Institute for the Social Sciences

since
1

File available since Release 1.0

version
1.0
author

Holger Heuser holger.heuser@gesis.org

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
access

protected

$language_filename

The filename for the language log

protected string $language_filename
Tags
access

protected

$handle

The handle for the file

private string $handle
Tags
access

private

$language_handle

The handle for the language file

private string $language_handle
Tags
access

private

$log_items

The items to log (from init)

private array<string|int, mixed> $log_items
Tags
access

private

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

Search results