\PrestaShopLoggerCore

Summary

Methods
Properties
Constants
sendByMail()
addLog()
getHash()
eraseAllLogs()
$id_log
$severity
$error_code
$message
$object_type
$object_id
$id_employee
$date_add
$date_upd
$definition
No constants found
_isPresent()
$is_present
N/A
No private methods found
No private properties found
N/A

Properties

$id_log

$id_log : integer

Type

integer — Log id

$severity

$severity : integer

Type

integer — Log severity

$error_code

$error_code : integer

Type

integer — Error code

$message

$message : string

Type

string — Message

$object_type

$object_type : string

Type

string — Object type (eg. Order, Customer...)

$object_id

$object_id : integer

Type

integer — Object ID

$id_employee

$id_employee : integer

Type

integer — Object ID

$date_add

$date_add : string

Type

string — Object creation date

$date_upd

$date_upd : string

Type

string — Object last modification date

$definition

$definition : 

Type

$is_present

$is_present : 

Type

Methods

sendByMail()

sendByMail(\unknown_type  $log) 

Send e-mail to the shop owner only if the minimal severity level has been reached

Parameters

\unknown_type $log

addLog()

addLog(string  $message, integer  $severity = 1, integer  $error_code = null, string  $object_type = null, integer  $object_id = null, boolean  $allow_duplicate = false,   $id_employee = null) : boolean

add a log item to the database and send a mail if configured for this $severity

Parameters

string $message

the log message

integer $severity
integer $error_code
string $object_type
integer $object_id
boolean $allow_duplicate

if set to true, can log several time the same information (not recommended)

$id_employee

Returns

boolean —

true if succeed

getHash()

getHash() : string

this function md5($this->message.$this->severity.$this->error_code.$this->object_type.$this->object_id)

Returns

string —

hash

eraseAllLogs()

eraseAllLogs() 

_isPresent()

_isPresent() : true

check if this log message already exists in database.

Returns

true —

if exists