In Java the three main streams stdin (Standard Input), stdout (Standard Output), and stderr (Standard Output Error) are handled by default by System.in, Sytem.out, and System.err respectively. In this example, we will try to show how to redirect the System.out.println() to a log file using Log4j logging services. 1. Introduction Printing messages to the console ...