Reputation: 35
I'm wondering if there is a way to suppress console output from a single library in processing? Specifically, I am using SimpleOpenNI and it constantly outputs stuff like the below many times a second:
[Info] [VTRgbPacketProcessor] avg. time: 22.8676ms -> ~43.73Hz [Info] [DepthPacketStreamParser] 1 packets were lost [Info] [OpenGLDepthPacketProcessor] avg. time: 5.9517ms -> ~168.019Hz
The library is working fine but the output is a bit annoying as I'm trying to use the console to test stuff.
Anyone know a way to suppress output from a specific library? I've looked through the SimpleOpenNI docs and cant find anything that helps.
Cheers
Upvotes: 3
Views: 289
Reputation: 42176
You generally have three options:
Option 1: Hopefully the library provides a way to disable console output. Look for something like setLogLevel()
or suppressWarnings()
.
Option 2: If the library is open source, you could just modify it yourself to get rid of the print statements.
Option 3: You could also modify the System.out
variable to point to your own custom class that filters messages you don't care about.
Upvotes: 2