Log channels : switch 3.0.0 channels to constant also

Those channels constants were introduced in support/2.7 with 8259a79c
This commit is contained in:
Pierre Goiffon
2021-06-29 11:58:18 +02:00
parent 0cffd567c2
commit 0dc03de7b2
3 changed files with 7 additions and 5 deletions

View File

@@ -540,9 +540,11 @@ class FileLog
*/
class LogChannels
{
const DEADLOCK = 'DeadLock';
const INLINE_IMAGE = 'InlineImage';
const PORTAL = 'portal';
public const CLI = 'CLI';
public const CONSOLE = 'console';
public const DEADLOCK = 'DeadLock';
public const INLINE_IMAGE = 'InlineImage';
public const PORTAL = 'portal';
}

View File

@@ -1879,7 +1879,7 @@ catch (Exception $e) {
}
$sOperationToLog = $operation ?? 'N/A';
IssueLog::Debug('UI.php operation='.$sOperationToLog.', error='.$e->getMessage()."\n".$sErrorStackTrace, 'console');
IssueLog::Debug('UI.php operation='.$sOperationToLog.', error='.$e->getMessage()."\n".$sErrorStackTrace, LogChannels::CONSOLE);
}

View File

@@ -434,7 +434,7 @@ class SetupUtils
// some CLI scripts are launched automatically
// we need a log so that we don't miss errors after migration !
IssueLog::Error($oCliPage->s_title.' '.$sMessageTitle, 'CLI', $aPhpCheckErrorsForPrint);
IssueLog::Error($oCliPage->s_title.' '.$sMessageTitle, LogChannels::CLI, $aPhpCheckErrorsForPrint);
exit($iExitCode);
}