That's the question. I'm trying to write some unit tests against it and want to disable its logging so I can more easily find my test output. I tried turning off everything I could think of with the logger (log4j), and it keeps writing to my console.
这就是问题所在。我正在尝试针对它编写一些单元测试,并希望禁用其日志记录,以便我可以更轻松地找到我的测试输出。我尝试用记录器(log4j)关闭我能想到的一切,并且它一直在写我的控制台。
1 个解决方案
#1
What system are you using?
你用的是什么系统?
In *nix you can eliminate output by piping to /dev/null:
在* nix中,您可以通过管道到/ dev / null来消除输出:
turbine &> /dev/null
or to only pipe errors to a specific file use:
或者只将错误传递给特定文件使用:
turbine 2> turbineOutput
So, 1> pipes only stdout, 2> pipes stderr, &> pipes everything.
所以,1>管道只有stdout,2>管道stderr,&>管道一切。
Or, maybe I don't know quite what you're asking?
或者,也许我不知道你在问什么?
#1
What system are you using?
你用的是什么系统?
In *nix you can eliminate output by piping to /dev/null:
在* nix中,您可以通过管道到/ dev / null来消除输出:
turbine &> /dev/null
or to only pipe errors to a specific file use:
或者只将错误传递给特定文件使用:
turbine 2> turbineOutput
So, 1> pipes only stdout, 2> pipes stderr, &> pipes everything.
所以,1>管道只有stdout,2>管道stderr,&>管道一切。
Or, maybe I don't know quite what you're asking?
或者,也许我不知道你在问什么?