Replace call for Logger with DI::logger() in tesseract addon

This commit is contained in:
Art4 2025-01-24 11:57:34 +00:00
parent 763c5026f2
commit a7b26f6453

View file

@ -7,7 +7,6 @@
*/
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\System;
use thiagoalessio\TesseractOCR\TesseractOCR;
@ -17,7 +16,7 @@ function tesseract_install()
{
Hook::register('ocr-detection', __FILE__, 'tesseract_ocr_detection');
Logger::notice('installed tesseract');
DI::logger()->notice('installed tesseract');
}
function tesseract_ocr_detection(&$media)
@ -33,6 +32,6 @@ function tesseract_ocr_detection(&$media)
$ocr->imageData($media['img_str'], strlen($media['img_str']));
$media['description'] = $ocr->run();
} catch (\Throwable $th) {
Logger::info('Error calling TesseractOCR', ['message' => $th->getMessage()]);
DI::logger()->info('Error calling TesseractOCR', ['message' => $th->getMessage()]);
}
}