[Pkg-owncloud-commits] [owncloud] 59/172: adding interpolation as requested by PSR-3
David Prévot
taffit at moszumanska.debian.org
Sun May 18 20:09:40 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit d853c60d7e4eba63c8cb402249b7b77b94c4c764
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Mon May 12 10:54:09 2014 +0200
adding interpolation as requested by PSR-3
---
lib/private/log.php | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/private/log.php b/lib/private/log.php
index c7a3b99..682f632 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);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list