Skip to content

Commit 8d29cc7

Browse files
committed
fix verbosity
1 parent 095f9af commit 8d29cc7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

example.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
use Buffer\Bufflog;
55

6+
// putenv("LOG_VERBOSITY=WARNING");
67
Bufflog::debug("I am a debug");
78
Bufflog::debug("I am a debug with context", ["my key" => " my value"]);
89

src/php-bufflog/BuffLog.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,9 @@ private static function createLogger()
118118
private static function setVerbosity()
119119
{
120120
$envVerbosity = getenv("LOG_VERBOSITY");
121-
if ($envVerbosity !== FALSE && array_key_exists($envVerbosity, self::$verbosityList )) {
122-
self::$currentVerbosity = getenv("LOG_VERBOSITY");
121+
if ($envVerbosity !== FALSE && array_key_exists($envVerbosity, self::$verbosityList)) {
122+
self::$currentVerbosity = self::$verbosityList[$envVerbosity];
123123
}
124-
echo "Log verbosity set to " . self::$verbosity;
125124
}
126125

127126
public static function getLogger()

0 commit comments

Comments
 (0)