KevM / tikaondotnet

Use the Java Tika text extraction library on the .NET platform
http://kevm.github.io/tikaondotnet/
Apache License 2.0
197 stars 72 forks source link

Disable ERROR and WARN messages in console app #101

Closed Airn5475 closed 7 years ago

Airn5475 commented 7 years ago

I am using TikaOnDotNet in a console app. There are many ERROR and WARN messages that appear as I parse a variety of documents. Here are just two examples: ERROR OpenType Layout tables used in font ABCDEE+Times New Roman are not implemented in PDFBox and will be ignored WARN No Unicode mapping for CID+58 (58) in font Arial-ItalicMT

Is there any way to disable these messages? They are taking over my output window!

HappyCoderMan commented 7 years ago

You'll need this: using java.io; using org.apache.commons.io.output;

Then, add this line to your c# code: java.lang.System.setErr(new PrintStream(new NullOutputStream()));

Airn5475 commented 7 years ago

Thank you! That did the trick!

KevM commented 7 years ago

This feels like it would be great to have documented. Anyone want to submit a PR for this?

TechnikEmpire commented 7 years ago

@KevM When you ask for these documentation PR's, where exactly would stuff like this and #97 etc be documented? Developers.md? I briefly started fishing through contrib guide etc trying to sort that out but I'm lazy so I thought I'd just ask.

KevM commented 7 years ago

@TechnikEmpire thanks for thinking about this. Where to put this information is a bit tricky because the text extractor nuget docs is where this belongs but this project has no separate repo for that add-on. I think maybe for now the best place would be to enhance the readme.md with a FAQ or getting started section for the TextExtractor nuget. What do you think of this?

TechnikEmpire commented 7 years ago

@KevM they're kind of odd ball things that I think would be best categorized in a FAQ or pitfalls section or something. Seems kind of out of place to slap into the readme no? What about doing a section like a FAQ on the GitHub pages and then referencing it in the readme, or maybe just drop this stuff into the wiki?

KevM commented 7 years ago

Sounds fine to me. Can you do this? On Tue, Aug 1, 2017 at 2:30 PM Jesse Nicholson notifications@github.com wrote:

@KevM https://github.com/kevm they're kind of odd ball things that I think would be best categorized in a FAQ or pitfalls section or something. Seems kind of out of place to slap into the readme no? What about doing a section like a FAQ on the GitHub pages and then referencing it in the readme, or maybe just drop this stuff into the wiki?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/KevM/tikaondotnet/issues/101#issuecomment-319472529, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAGHcKs2QRM4xsTxUWpiFKHpkUrjoc9ks5sT3zegaJpZM4NzGZl .

TechnikEmpire commented 7 years ago

@KevM sure when I have a few minutes of down time. So GitHub pages plus readme or wiki?

TechnikEmpire commented 7 years ago

That should say GitHub pages plus readme, or just drop it in wiki? I'm assuming the former.

KevM commented 7 years ago

Hmm, I think the GitHub pages are currently geared for a landing page rather than where to go for documentation. So maybe a wiki page would be better. I just turned on the wiki feature for this repo.

TechnikEmpire commented 7 years ago

Cool sounds good. Does the wiki come down in PRs? Never tried. If it does I'll fork and document the outstanding stuff sometime in the next few days I gotta clear some work off my plate first.

KevM commented 7 years ago

You can just create pages and edit them at will.

On Wed, Aug 2, 2017 at 9:45 AM Jesse Nicholson notifications@github.com wrote:

Cool sounds good. Does the wiki come down in PRs? Never tried. If it does I'll fork and document the outstanding stuff sometime in the next few days I gotta clear some work off my plate first.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/KevM/tikaondotnet/issues/101#issuecomment-319694748, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAGHQoXdafVCoOGQbnjKClGR6ioRRGFks5sUIuWgaJpZM4NzGZl .