diff options
Diffstat (limited to 'lib/private/log.php')
-rw-r--r-- | lib/private/log.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/log.php b/lib/private/log.php index c7a3b99a5e0..682f6321474 100644 --- a/lib/private/log.php +++ b/lib/private/log.php @@ -144,6 +144,15 @@ class Log implements ILogger { } else { $app = 'no app in context'; } + // interpolate $message as defined in PSR-3 + $replace = array(); + foreach ($context as $key => $val) { + $replace['{' . $key . '}'] = $val; + } + + // interpolate replacement values into the message and return + $message = strtr($message, $replace); + $logger=$this->logger; $logger::write($app, $message, $level); } |