Skip to content

Commit 52f7cf7

Browse files
committed
Change all log methods to static
1 parent 35c4152 commit 52f7cf7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/php-bufflog/BuffLog.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ public static function debug($message)
2828
self::getLogger()->debug($logOutput);
2929
}
3030

31-
public function info($message)
31+
public static function info($message)
3232
{
33-
$logOutput = $this->formatLog($message, Logger::INFO, $context = [], $extra = []);
34-
$this->getLogger()->info($logOutput);
33+
$logOutput = self::formatLog($message, Logger::INFO, $context = [], $extra = []);
34+
self::getLogger()->info($logOutput);
3535
}
3636

37-
public function warn($message)
37+
public static function warn($message)
3838
{
39-
$logOutput = $this->formatLog($message, Logger::WARNING, $context = [], $extra = []);
40-
$this->getLogger()->warn($logOutput);
39+
$logOutput = self::formatLog($message, Logger::WARNING, $context = [], $extra = []);
40+
self::getLogger()->warn($logOutput);
4141
}
4242

4343
public static function error($message)
@@ -47,10 +47,10 @@ public static function error($message)
4747
}
4848

4949
// @TODO: That one might could also create an alert in Datadog?
50-
public function critical($message)
50+
public static function critical($message)
5151
{
52-
$logOutput = $this->formatLog($message, Logger::CRITICAL, $context = [], $extra = []);
53-
$this->getLogger()->critical($logOutput);
52+
$logOutput = self::formatLog($message, Logger::CRITICAL, $context = [], $extra = []);
53+
self::getLogger()->critical($logOutput);
5454
}
5555

5656
private function formatLog($message, $level, $context = [], $extra = [])

0 commit comments

Comments
 (0)