Skip to content

Update Logger #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/Model/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ public function __construct(
* @param array $context The log context
* @return Boolean Whether the record has been processed
*/
public function debug($message, array $context = [])
public function debug($message, array $context = []) : void
{
if (!$this->scopeConfig->getValue('shqlogmenu/shqlogger/active')) {
return false;
return;
}

return $this->logMessage($message, $context, self::SEVERITY_NOTICE);
$this->logMessage($message, $context, self::SEVERITY_NOTICE);
}

/**
Expand All @@ -99,13 +99,13 @@ public function debug($message, array $context = [])
* @param array $context The log context
* @return Boolean Whether the record has been processed
*/
public function info($message, array $context = [])
public function info($message, array $context = []) : void
{
if (!$this->scopeConfig->getValue('shqlogmenu/shqlogger/active')) {
return false;
return;
}

return $this->logMessage($message, $context, self::SEVERITY_MINOR);
$this->logMessage($message, $context, self::SEVERITY_MINOR);
}

/**
Expand All @@ -117,13 +117,13 @@ public function info($message, array $context = [])
* @param array $context The log context
* @return Boolean Whether the record has been processed
*/
public function warning($message, array $context = [])
public function warning($message, array $context = []) : void
{
if (!$this->scopeConfig->getValue('shqlogmenu/shqlogger/active')) {
return false;
return;
}

return $this->logMessage($message, $context, self::SEVERITY_MAJOR);
$this->logMessage($message, $context, self::SEVERITY_MAJOR);
}

/**
Expand All @@ -135,12 +135,12 @@ public function warning($message, array $context = [])
* @param array $context The log context
* @return Boolean Whether the record has been processed
*/
public function critical($message, array $context = [])
public function critical($message, array $context = []) : void
{
if (!$this->scopeConfig->getValue('shqlogmenu/shqlogger/active')) {
return false;
return;
}
return $this->logMessage($message, $context, self::SEVERITY_CRITICAL);
$this->logMessage($message, $context, self::SEVERITY_CRITICAL);
}


Expand Down