diff --git a/library/log4php/layouts/LoggerLayoutSerialized.php b/library/log4php/layouts/LoggerLayoutSerialized.php new file mode 100644 --- /dev/null +++ b/library/log4php/layouts/LoggerLayoutSerialized.php @@ -0,0 +1,55 @@ +setBoolean('locationInfo', $value); + } + + /** Returns the location information flag. */ + public function getLocationInfo() { + return $this->locationInfo; + } + + public function format(LoggerLoggingEvent $event) { + // If required, initialize the location data + if ($this->locationInfo) { + $event->getLocationInformation(); + } + return serialize($event) . PHP_EOL; + } +}