Logger class

The following sections explain each method of the class.

write_log


public bool write_log ( string $msg, int $code = 0, string $level = 'info')

Writes a line in the log file. Here are the date code level and message, written into this order.

Parameter list
msg

The message that is written to the log file.

code

A code for exact identification of the line. Default to 0

level

The level of the message. The field is user definable but serves to help identify the logs. If it is an error, a warning or just to get noticed.


delete_log


public void delete_log ( )

Deletes the complete contents of the logs irrevocable.


read_log


public string read_log ( )

Returns the entire contents of the logs.