Skip to content

Commit ba4b8eb

Browse files
committed
Remove extra parameters
1 parent 21b780d commit ba4b8eb

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/php-bufflog/BuffLog.php

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,59 +30,59 @@ class BuffLog {
3030
"CRITICAL" => Logger::CRITICAL
3131
];
3232

33-
public static function debug($message, $context = [], $extra = [])
33+
public static function debug($message, $context = [])
3434
{
3535
self::setVerbosity();
3636
if (self::$currentVerbosity > Logger::DEBUG) {
3737
return;
3838
}
3939

40-
$logOutput = self::formatLog($message, Logger::DEBUG, $context, $extra);
40+
$logOutput = self::formatLog($message, Logger::DEBUG, $context);
4141
self::getLogger()->debug($logOutput);
4242
}
4343

44-
public static function info($message, $context = [], $extra = [])
44+
public static function info($message, $context = [])
4545
{
4646
self::setVerbosity();
4747
if (self::$currentVerbosity > Logger::INFO) {
4848
return;
4949
}
5050

51-
$logOutput = self::formatLog($message, Logger::INFO, $context, $extra);
51+
$logOutput = self::formatLog($message, Logger::INFO, $context);
5252
self::getLogger()->info($logOutput);
5353
}
5454

55-
public static function warning($message, $context = [], $extra = [])
55+
public static function warning($message, $context = [])
5656
{
5757
self::setVerbosity();
5858
if (self::$currentVerbosity > Logger::WARNING) {
5959
return;
6060
}
6161

62-
$logOutput = self::formatLog($message, Logger::WARNING, $context, $extra);
62+
$logOutput = self::formatLog($message, Logger::WARNING, $context);
6363
self::getLogger()->warn($logOutput);
6464
}
6565

66-
public static function error($message, $context = [], $extra = [])
66+
public static function error($message, $context = [])
6767
{
6868
self::setVerbosity();
6969
if (self::$currentVerbosity > Logger::ERROR) {
7070
return;
7171
}
7272

73-
$logOutput = self::formatLog($message, Logger::ERROR, $context, $extra);
73+
$logOutput = self::formatLog($message, Logger::ERROR, $context);
7474
self::getLogger()->error($logOutput);
7575
}
7676

7777
// @TODO: That one might could also create an alert in Datadog?
78-
public static function critical($message, $context = [], $extra = [])
78+
public static function critical($message, $context = [])
7979
{
8080
self::setVerbosity();
81-
$logOutput = self::formatLog($message, Logger::CRITICAL, $context, $extra);
81+
$logOutput = self::formatLog($message, Logger::CRITICAL, $context);
8282
self::getLogger()->critical($logOutput);
8383
}
8484

85-
private function formatLog($message, $level, $context = [], $extra = [])
85+
private function formatLog($message, $level, $context = [])
8686
{
8787
// Add traces information to logs to be able correlate with APM
8888
$ddTraceSpan = \DDTrace\GlobalTracer::get()->getActiveSpan();
@@ -97,8 +97,7 @@ private function formatLog($message, $level, $context = [], $extra = [])
9797
"datetime" => date(\DateTime::ATOM),
9898
// we could use timestamp if we need ms precision (but it isn't readable) https://docs.datadoghq.com/logs/processing/#reserved-attributes
9999
// 'timestamp' => round(microtime(true) * 1000),
100-
"context" => $context,
101-
"extra" => $extra
100+
"context" => $context
102101
];
103102

104103
try {

0 commit comments

Comments
 (0)