Replace call for Logger with DI::logger() in tesseract addon
This commit is contained in:
parent
763c5026f2
commit
a7b26f6453
1 changed files with 2 additions and 3 deletions
|
@ -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()]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue