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
精彩评论