Getting this warning, How should I handle it? override 'BaseOutputReader.Options.forMostlySilentProcess()'
已回答
I'm using KillableColoredProcessHandler with GeneralCommandLine for running a process. I also see that readerOptions is overridden already in KillableColoredProcessHandler. But I still get this warning. Am I doing anything wrong ?
WARN - n.process.BaseOSProcessHandler - Process hasn't generated any output for a long time.
If it's a long-running mostly idle daemon process, consider overriding OSProcessHandler#readerOptions with 'BaseOutputReader.Options.forMostlySilentProcess()' to reduce CPU usage.
请先登录再写评论。
You're using KillableColoredProcessHandler which IS NOT overriding readerOptions method by default.
It happens in KillableColoredProcessHandler.Silent class which extends KillableColoredProcessHandler.
You have to just use Silent inner static class instead.