Skip to content

Commit

Permalink
Merge pull request #245 from giftcards/master
Browse files Browse the repository at this point in the history
Query logging should be done at the debug level not info
  • Loading branch information
jmikola committed Jun 18, 2014
2 parents fe55618 + 6501716 commit 3aafa97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Logger/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ public function logQuery(array $query)
}
});

$this->logger->info($this->prefix.json_encode($query));
$this->logger->debug($this->prefix.json_encode($query));
}
}
6 changes: 3 additions & 3 deletions Tests/Logger/LoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testLogQuery()
$log = json_encode($query);

$this->logger->expects($this->once())
->method('info')
->method('debug')
->with('MongoDB query: '.$log);

$logger = new Logger($this->logger);
Expand All @@ -50,7 +50,7 @@ public function testMongoBinDataBase64Encoded()
$log = json_encode(array('foo' => array('binData' => base64_encode($binData->bin))));

$this->logger->expects($this->once())
->method('info')
->method('debug')
->with('MongoDB query: '.$log);

$logger = new Logger($this->logger);
Expand All @@ -76,7 +76,7 @@ public function testInfinityAndNanEncoded()
));

$this->logger->expects($this->once())
->method('info')
->method('debug')
->with('MongoDB query: '.$log);

$logger = new Logger($this->logger);
Expand Down

0 comments on commit 3aafa97

Please sign in to comment.