public function doSomething() { $log = new Logger($this); $log->info('doing something here'); $x = 'something'; $log->debugf('Variable $x=%s', $x); $log->turn('off debug'); // for this logger only $log->debug('this will not be written'); }
public function setUp() { $this->log = new Logger($this); Logger::setWriter($this); }