gdr2_Log

Class for saving debug dumps into file.


function __construct($log_path = ”)

  • $log_path: full path to the log file.

Constructor


public truncate()

Truncates log file to zero lenght deleting all data inside.


public slog($info, $mode = “a+”)

  • $info: object to dump.
  • $mode: file open mode.

Writes log info name/value into the file withou heading.


public log($msg, $info, $mode = “a+”)

  • $msg: log entry message.
  • $info: object to dump.
  • $mode: file open mode.

Writes log info name/value into the file.


public sdump($object, $mode = “a+”)

  • $object: object to dump
  • $mode: file open mode.

Writes object dump into the log file withou heading.


public dump($msg, $object, $block = “none”, $mode = “a+”)

  • $msg: log entry message.
  • $object: object to dump.
  • $block: adds start or end dump limiters { none | start | end }.
  • $mode: file open mode.

Writes a object dump into the log file.

Comments

Leave a Reply