Skip to content

Commit 82007fa

Browse files
committed
rename formatting function
1 parent 67236c3 commit 82007fa

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/php-bufflog/BuffLog.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,37 @@ public function __construct()
2929

3030
public function debug($message)
3131
{
32-
$this->formatMessage($message, Logger::DEBUG, $context = [], $extra = []);
33-
$this->getLogger()->debug($message);
32+
$logOutput = $this->formatLog($message, Logger::DEBUG, $context = [], $extra = []);
33+
$this->getLogger()->debug($logOutput);
3434
}
3535

3636
public function info($message)
3737
{
38-
$this->formatMessage($message, Logger::INFO, $context = [], $extra = []);
39-
$this->getLogger()->info($message);
38+
$logOutput = $this->formatLog($message, Logger::INFO, $context = [], $extra = []);
39+
$this->getLogger()->info($logOutput);
4040
}
4141

4242
public function warn($message)
4343
{
44-
$this->formatMessage($message, Logger::WARNING, $context = [], $extra = []);
45-
$this->getLogger()->warn($message);
44+
$logOutput = $this->formatLog($message, Logger::WARNING, $context = [], $extra = []);
45+
$this->getLogger()->warn($logOutput);
4646
}
4747

4848

4949
public function error($message)
5050
{
51-
$this->formatMessage($message, Logger::ERROR, $context = [], $extra = []);
52-
$this->getLogger()->error($message);
51+
$logOutput = $this->formatLog($message, Logger::ERROR, $context = [], $extra = []);
52+
$this->getLogger()->error($logOutput);
5353
}
5454

5555
// @TODO: That one might could also create an alert in Datadog?
5656
public function critical($message)
5757
{
58-
$this->formatMessage($message, Logger::CRITICAL, $context = [], $extra = []);
59-
$this->getLogger()->critical($message);
58+
$logOutput = $this->formatLog($message, Logger::CRITICAL, $context = [], $extra = []);
59+
$this->getLogger()->critical($logOutput);
6060
}
6161

62-
private function formatMessage($message, $level, $context = [], $extra = [])
62+
private function formatLog($message, $level, $context = [], $extra = [])
6363
{
6464
$output = [
6565
"message" => $message,

0 commit comments

Comments
 (0)