Xlog

A log class for PHP
Download

Xlog Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Costin Trifan
  • Publisher web site:
  • http://june-js.com/

Xlog Tags


Xlog Description

A log class for PHP XLog, a PHP 5 oriented object class, can be used for logging messages into one or more files. To start using it you first have to initialize the class and, optionally, set the path to the default log file(if you use only one file).$log = new XLog("path-to-the-log-file");If you intend to use more than one file to log your messages, then initialize the XLog class whithout arguments:$log = new XLog();To write into the log file, you'll have to call the XLog::Write() with the following arguments:(String) $message; The message to write into the log file.(String) $file The file where the error has occurred .(Number) $line The line where the error has occurred .(Boolean) $clear_before Whether or not to delete the existent content from the log file before writting the new one.(String) $log_file The absolute path to the log file. Optional if only one log file is used.The message can be either text or html content; it doesn't really matter.Also, the XLog class allows you to use any type of document you want to store your log entries(be it php, ini, txt, etc...). If your log folder isn't situated outside root directory you should use a php file to store your log entries. This way, if someone finds a way to your log file he will not be able to see the content of your file because that content is commented, unlike when using a text file where the content can't be hidden from browsers.


Xlog Related Software