mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Adopt to new loggin api
This commit is contained in:
@ -18,6 +18,7 @@ import docspell.extract.poi.{PoiExtract, PoiType}
|
||||
import docspell.extract.rtf.RtfExtract
|
||||
import docspell.files.ImageSize
|
||||
import docspell.files.TikaMimetype
|
||||
import docspell.logging.Logger
|
||||
|
||||
trait Extraction[F[_]] {
|
||||
|
||||
|
@ -10,11 +10,12 @@ import cats.effect._
|
||||
import cats.implicits._
|
||||
import fs2.Stream
|
||||
|
||||
import docspell.common.{Language, Logger}
|
||||
import docspell.common.Language
|
||||
import docspell.extract.internal.Text
|
||||
import docspell.extract.ocr.{OcrConfig, TextExtract}
|
||||
import docspell.extract.pdfbox.PdfMetaData
|
||||
import docspell.extract.pdfbox.PdfboxExtract
|
||||
import docspell.logging.Logger
|
||||
|
||||
object PdfExtract {
|
||||
final case class Result(txt: Text, meta: Option[PdfMetaData])
|
||||
|
@ -11,6 +11,7 @@ import fs2.Stream
|
||||
import fs2.io.file.Path
|
||||
|
||||
import docspell.common._
|
||||
import docspell.logging.Logger
|
||||
|
||||
object Ocr {
|
||||
|
||||
|
@ -12,6 +12,7 @@ import fs2.Stream
|
||||
import docspell.common._
|
||||
import docspell.extract.internal.Text
|
||||
import docspell.files._
|
||||
import docspell.logging.Logger
|
||||
|
||||
object TextExtract {
|
||||
|
||||
|
@ -32,7 +32,7 @@ trait PdfboxPreview[F[_]] {
|
||||
}
|
||||
|
||||
object PdfboxPreview {
|
||||
private[this] val logger = org.log4s.getLogger
|
||||
private[this] val logger = docspell.logging.unsafeLogger
|
||||
|
||||
def apply[F[_]: Sync](cfg: PreviewConfig): F[PdfboxPreview[F]] =
|
||||
Sync[F].pure(new PdfboxPreview[F] {
|
||||
|
@ -9,7 +9,6 @@ package docspell.extract.ocr
|
||||
import cats.effect.IO
|
||||
import cats.effect.unsafe.implicits.global
|
||||
|
||||
import docspell.common.Logger
|
||||
import docspell.files.TestFiles
|
||||
|
||||
import munit._
|
||||
@ -17,7 +16,7 @@ import munit._
|
||||
class TextExtractionSuite extends FunSuite {
|
||||
import TestFiles._
|
||||
|
||||
val logger = Logger.log4s[IO](org.log4s.getLogger)
|
||||
val logger = docspell.logging.getLogger[IO]
|
||||
|
||||
test("extract english pdf".ignore) {
|
||||
val text = TextExtract
|
||||
|
Reference in New Issue
Block a user