append() public method

Appends the given message along with the additional information into the log.
public append ( string $message, integer $severity = LOG_INFO, mixed $additionalData = null, string $packageKey = null, string $className = null, string $methodName = null ) : void
$message string The message to log
$severity integer One of the LOG_* constants
$additionalData mixed A variable containing more information about the event to be logged
$packageKey string Key of the package triggering the log (determined automatically if not specified)
$className string Name of the class triggering the log (determined automatically if not specified)
$methodName string Name of the method triggering the log (determined automatically if not specified)
return void
 /**
  * @test
  */
 public function appendIgnoresMessagesAboveTheSeverityThreshold()
 {
     $logFileUrl = vfsStream::url('testDirectory') . '/test.log';
     $backend = new FileBackend(['logFileUrl' => $logFileUrl]);
     $backend->setSeverityThreshold(LOG_EMERG);
     $backend->open();
     $backend->append('foo', LOG_INFO);
     $this->assertSame(0, vfsStreamWrapper::getRoot()->getChild('test.log')->size());
 }