\qfq Log

Summary

Methods
Properties
Constants
__construct()
set_fr_error()
log_sql()
log_do()
log_mail()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
prepare_log_file_dir()
$config
$config_level
$fr_error
N/A

Properties

$config

$config : array

Type

array

$config_level

$config_level : array

Type

array — order to compare loglevel

$fr_error

$fr_error : array

Type

array — Emulate global variable: will be set much earlier in other functions. Will be shown in error messages.

Methods

__construct()

__construct(array  $tmp_config) 

Initializes class

Parameters

array $tmp_config

: Part of array 'fr_array': 'global.'

Throws

\Exception

set_fr_error()

set_fr_error(array  $fr_error) : void

Set Array fr_error: setter function to set most recent values.

Will be shown in log messages.

Parameters

array $fr_error

: uid, pid, row, column_idx, full_level

log_sql()

log_sql(string  $origin, string  $msg, integer  $affected_rows, integer  $new_id, string  $sql) : void

log_sql: wrapper for log_do() for sql logging

Parameters

string $origin

: Sender of the logmessage. F.e.: 'form', 'save', 'report', 'extjs', ...

string $msg

: Only filled if there was an error

integer $affected_rows

: Number of rows inserted, updated or deleted.

integer $new_id

: last_insert_id()

string $sql

: SQL statement fired

log_do()

log_do(string  $class, string  $status,   $origin,   $message) 

log_do: format log entries, build fix part, append dynamic part, write.

Parameters

string $class

: 'error', 'mail', 'sql', 'browser'. New classes has to be defined in ext_localconf.php

string $status

: 'E' (0:error), 'W' (1:warning), 'I' (2:information), 'D1' (3:debug verbose), 'D2' (4:debug very verbose), 'D3' (5:debug very very verbose)

$origin
$message

Throws

\qfq\CodeReportException
\qfq\SyntaxReportException

log_mail()

log_mail(  $origin, string  $status, string  $msg, string  $mailarr) : \qfq\The

Logs every email (failed or successfull)

Parameters

$origin
string $status

: 'E' (0:error), 'W' (1:warning), 'I' (2:information), 'D1' (3:debug verbose), 'D2' (4:debug very verbose), 'D3' (5:debug very very verbose)

string $msg

: Message

string $mailarr

: data to log

Returns

\qfq\The —

content that is displayed on the website

prepare_log_file_dir()

prepare_log_file_dir(string  $filename) 

Check if path of logfile exists. No: create it.

Check if path of logfile is writeable.

Parameters

string $filename

Name of logfile

Throws

\Exception