public void output ( String content , Logger console , String filename ) throws IOException { if ( filename == null || "-" . equals ( filename ) ) { console . info ( content ) ; } else { FSDataOutputStream outgoing = create ( filename ) ; try { outgoing . write ( content . getBytes ( StandardCharsets . UTF_8 ) ) ; } finally { outgoing . close ( ) ; } } }
Output content to the console or a file .