Added getter for LoggerEvent::$locationInfo
This can be used to override the default event's location information.
Signed-off-by: Ivan Habunek <ihabunek@apache.org>
diff --git a/src/main/php/LoggerLoggingEvent.php b/src/main/php/LoggerLoggingEvent.php
index 29ba361..c810220 100644
--- a/src/main/php/LoggerLoggingEvent.php
+++ b/src/main/php/LoggerLoggingEvent.php
@@ -142,10 +142,10 @@
* Returns the full qualified classname.
* TODO: PHP does contain namespaces in 5.3. Those should be returned too,
*/
- public function getFullQualifiedClassname() {
- return $this->fqcn;
- }
-
+ public function getFullQualifiedClassname() {
+ return $this->fqcn;
+ }
+
/**
* Set the location information for this logging event. The collected
* information is cached for future use.
@@ -195,6 +195,14 @@
}
/**
+ * Sets the event's location info. Can be used to override the default info.
+ * @param LoggerLocationInfo $locationInfo
+ */
+ public function setLocationInformation(LoggerLocationInfo $locationInfo) {
+ $this->locationInfo = $locationInfo;
+ }
+
+ /**
* Return the level of this event. Use this form instead of directly
* accessing the {@link $level} field.
* @return LoggerLevel