theitd

Joomla! Logging (3.4)

Oct 12th, 2015
661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. // Include the JLog class.
  2. jimport('joomla.log.log');
  3.  
  4. // Add the logger.
  5. JLog::addLogger(
  6.      // Pass an array of configuration options
  7.     array(
  8.             // Set the name of the log file
  9.             'text_file' => 'test.log.php',
  10.             // (optional) you can change the directory
  11.             'text_file_path' => 'somewhere/logs'
  12.      )
  13. );
  14.  
  15. // start logging...
  16. JLog::add('Starting to log');
Advertisement
Add Comment
Please, Sign In to add comment