Permalink
Browse files

Bail early on log formatting if message has no placeholders.

  • Loading branch information...
bobthecow committed Jan 20, 2013
1 parent d0023b5 commit 1f07edd1adf4c3d92f212bf758ba63862586ec61
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Mustache/Logger/StreamLogger.php
@@ -177,7 +177,9 @@ protected static function formatLine($level, $message, array $context = array())
*/
protected static function interpolateMessage($message, array $context = array())
{
- $message = (string) $message;
+ if (strpos($message, '{') === false) {
+ return $message;
+ }
// build a replacement array with braces around the context keys
$replace = array();

0 comments on commit 1f07edd

Please sign in to comment.