Skip to content

Commit 8a0f6ef

Browse files
committed
additial PSR-3 log level. #ref-74
1 parent 904cfa0 commit 8a0f6ef

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/JiraClient.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,25 @@ public function __construct(ConfigurationInterface $configuration = null, Logger
9999
*/
100100
private function convertLogLevel($log_level)
101101
{
102+
$log_level = strtoupper($log_level);
103+
102104
switch ($log_level) {
105+
case 'EMERGENCY':
106+
return Logger::EMERGENCY;
107+
case 'ALERT':
108+
return Logger::ALERT;
109+
case 'CRITICAL':
110+
return Logger::CRITICAL;
111+
case 'ERROR':
112+
return Logger::ERROR;
113+
case 'WARNING':
114+
return Logger::WARNING;
115+
case 'NOTICE':
116+
return Logger::NOTICE;
103117
case 'DEBUG':
104118
return Logger::DEBUG;
105119
case 'INFO':
106120
return Logger::INFO;
107-
case 'ERROR':
108-
return Logger::ERROR;
109121
default:
110122
return Logger::WARNING;
111123
}

0 commit comments

Comments
 (0)