fix: [localTool:CommonConnector] Ensure one logger per connector
parent
5eeda6b682
commit
20cc6017d0
|
@ -24,21 +24,24 @@ class CommonConnectorTools
|
|||
|
||||
public function __construct()
|
||||
{
|
||||
Log::setConfig("LocalToolDebug", [
|
||||
if (empty(Log::getConfig("LocalToolDebug{$this->connectorName}"))) {
|
||||
Log::setConfig("LocalToolDebug{$this->connectorName}", [
|
||||
'className' => FileLog::class,
|
||||
'path' => LOGS,
|
||||
'file' => "{$this->connectorName}-debug",
|
||||
'scopes' => [$this->connectorName],
|
||||
'levels' => ['notice', 'info', 'debug'],
|
||||
]);
|
||||
Log::setConfig("LocalToolError", [
|
||||
}
|
||||
if (empty(Log::getConfig("LocalToolError{$this->connectorName}"))) {
|
||||
Log::setConfig("LocalToolError{$this->connectorName}", [
|
||||
'className' => FileLog::class,
|
||||
'path' => LOGS,
|
||||
'file' => "{$this->connectorName}-error",
|
||||
'scopes' => [$this->connectorName],
|
||||
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected function logDebug($message)
|
||||
|
|
Loading…
Reference in New Issue