Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('error_reporting', E_ALL);
- ini_set('display_errors', 1);
- echo "Testing loging! - 5";
- require 'log4php/Logger.php';
- Logger::configure('log4php.xml');
- class Elder
- {
- protected $log;
- public function __construct()
- {
- $this->log = Logger::getLogger('myLogger');
- echo "<pre>";
- var_dump($this->log);
- echo "</pre>";
- }
- public function logSomething()
- {
- $this->log->info("From within");
- }
- }
- class Youth extends Elder
- {
- public function doSomething()
- {
- $this->logSomething();
- }
- }
- $y = new Youth();
- $y->doSomething();
- ?>
Add Comment
Please, Sign In to add comment