1 18 19 package jcifs.util; 20 21 import java.io.PrintStream ; 22 23 30 31 public class LogStream extends PrintStream { 32 33 private static LogStream inst; 34 35 public static int level = 1; 36 37 public LogStream( PrintStream stream ) { 38 super( stream ); 39 } 40 41 public static void setLevel( int level ) { 42 LogStream.level = level; 43 } 44 48 public static void setInstance( PrintStream stream ) { 49 inst = new LogStream( stream ); 50 } 51 public static LogStream getInstance() { 52 if( inst == null ) { 53 setInstance( System.err ); 54 } 55 return inst; 56 } 57 } 58 59 | Popular Tags |