Unnecessary WARNING Logging?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unnecessary WARNING Logging?

lewis john mcgibbney-2
Hi Folks,
I don't know when it was introduced, by I see the following, rather
annoying WARNING messages in many logs now.
I feel that these should not be WARNING e.g. what if I don't want any of
them to be initiated... which is exactly the case over when we use Tika in
Apache Any23.
Does anyone have objections if I turn this logging off?... or was there
some other primary motivation for every application to log this message?
Thanks,
Lewis

Feb 28, 2018 6:09:55 AM
org.apache.tika.config.InitializableProblemHandler$3
handleInitializableProblem
WARNING: JBIG2ImageReader not loaded. jbig2 files will be ignored
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.
TIFFImageWriter not loaded. tiff files will not be processed
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.
J2KImageReader not loaded. JPEG2000 files will not be processed.
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.

Feb 28, 2018 6:09:55 AM
org.apache.tika.config.InitializableProblemHandler$3
handleInitializableProblem
WARNING: org.xerial's sqlite-jdbc is not loaded.
Please provide the jar on your classpath to parse sqlite files.
See tika-parsers/pom.xml for the correct version.


--
http://home.apache.org/~lewismc/
http://people.apache.org/keys/committer/lewismc
Reply | Threaded
Open this post in threaded view
|

Re: Unnecessary WARNING Logging?

Nick Burch-2
On Tue, 27 Feb 2018, lewis john mcgibbney wrote:
> I don't know when it was introduced, by I see the following, rather
> annoying WARNING messages in many logs now.

IIRC we're changing those to ignore in Tika 2.x, but as we always warned
for missing parsers / missing parser classes in 1.x we can't really change
the default without surprising people

> I feel that these should not be WARNING e.g. what if I don't want any of
> them to be initiated... which is exactly the case over when we use Tika in
> Apache Any23.

Just set the load error handler to ignore, and you won't be notified of
anything missing. (It's then up to you to ensure you didn't miss any
classes or jars you wanted!)

eg in a Tika config:
<properties>
   <service-loader loadErrorHandler="IGNORE"/>
</properties>

See also https://tika.apache.org/1.17/configuring.html#Load_Error_Handling

Nick
Reply | Threaded
Open this post in threaded view
|

Re: Unnecessary WARNING Logging?

lewis john mcgibbney-2
In reply to this post by lewis john mcgibbney-2
Thank you Nick, I was not aware of the config feature.
Best
Lewis

On Thu, Mar 1, 2018 at 12:17 AM, <[hidden email]> wrote:

>
>
> From: Nick Burch <[hidden email]>
> To: [hidden email]
> Cc:
> Bcc:
> Date: Wed, 28 Feb 2018 08:03:53 +0000 (GMT)
> Subject: Re: Unnecessary WARNING Logging?
> On Tue, 27 Feb 2018, lewis john mcgibbney wrote:
>
>> I don't know when it was introduced, by I see the following, rather
>> annoying WARNING messages in many logs now.
>>
>
> IIRC we're changing those to ignore in Tika 2.x, but as we always warned
> for missing parsers / missing parser classes in 1.x we can't really change
> the default without surprising people
>
> I feel that these should not be WARNING e.g. what if I don't want any of
>> them to be initiated... which is exactly the case over when we use Tika in
>> Apache Any23.
>>
>
> Just set the load error handler to ignore, and you won't be notified of
> anything missing. (It's then up to you to ensure you didn't miss any
> classes or jars you wanted!)
>
> eg in a Tika config:
> <properties>
>   <service-loader loadErrorHandler="IGNORE"/>
> </properties>
>
> See also https://tika.apache.org/1.17/configuring.html#Load_Error_Handling
>
>