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