开发者

Sending System.out to a file and Commons Logging

I am using commons logging:

  private static final Log LOG = LogFactory.getLog(MyClass.class);

Why those logs doesn't go into the log file when I run

sh Main 2>&1 > logfil开发者_StackOverflow社区e

I am using the default properties and no log4j.properties are in the classpath.


You have the redirections backwards. They're processed from left to right. Try this:

sh Main > logfile 2>&1 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜