parent
4be31f19d5
commit
1ad0559436
|
@ -104,7 +104,7 @@ class IndexJob extends TimedJob
|
|||
{
|
||||
if ('success' === $type || 'info' === $type) {
|
||||
// If this is just an informational message, we log it with level info
|
||||
$this->logger->info('Memories: '.$msg);
|
||||
$this->logger->info($msg, ['app' => Application::APPNAME]);
|
||||
}
|
||||
|
||||
if ($this->_hasError && 'success' === $type) {
|
||||
|
@ -116,10 +116,10 @@ class IndexJob extends TimedJob
|
|||
$this->config->setAppValue(Application::APPNAME, 'last_index_job_status_type', $type);
|
||||
|
||||
if ('warning' === $type) {
|
||||
$this->logger->warning('Memories: '.$msg);
|
||||
$this->logger->warning($msg, ['app' => Application::APPNAME]);
|
||||
} elseif ('error' === $type) {
|
||||
$this->_hasError = true;
|
||||
$this->logger->error('Memories: '.$msg);
|
||||
$this->logger->error($msg, ['app' => Application::APPNAME]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,8 @@ class PostWriteListener implements IEventListener
|
|||
try {
|
||||
$this->tw->processFile($node);
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Memories failed to process file: {message}', [
|
||||
$this->logger->error('Failed to process file EXIF data', [
|
||||
'app' => 'memories',
|
||||
'message' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -176,7 +176,8 @@ class Index
|
|||
} catch (ProcessClosedException $e) {
|
||||
throw $e;
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Failed to index folder {folder}: {error}', [
|
||||
$this->logger->error('Failed to index folder', [
|
||||
'app' => 'memories',
|
||||
'folder' => $folder->getPath(),
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
@ -278,7 +279,7 @@ class Index
|
|||
*/
|
||||
private function error(string $message): void
|
||||
{
|
||||
$this->logger->error($message);
|
||||
$this->logger->error($message, ['app' => 'memories']);
|
||||
|
||||
if ($this->output) {
|
||||
$this->output->writeln("<error>{$message}</error>\n");
|
||||
|
|
Loading…
Reference in New Issue