1 26 package com.yworks.yguard.obf.classfile; 27 28 import java.io.PrintStream ; 29 30 34 public class Logger 35 { 36 private static Logger instance; 37 private PrintStream out; 38 private PrintStream err; 39 40 private boolean allResolved = true; 41 42 static{ 43 new Logger(System.out, System.err); 44 } 45 46 public static Logger getInstance(){ 47 return instance; 48 } 49 50 51 protected Logger() 52 { 53 instance = this; 54 } 55 56 protected Logger(PrintStream out, PrintStream err){ 57 instance = this; 58 this.out = out; 59 this.err = err; 60 } 61 62 public void error(String message){ 63 err.println(message); 64 } 65 66 public void log(String message){ 67 out.println(message); 68 } 69 70 public void warning(String message){ 71 err.println(message); 72 } 73 74 public void warningToLogfile(String message) {} 75 76 public void setUnresolved() { 77 this.allResolved = false; 78 } 79 80 public boolean isAllResolved() { 81 return allResolved; 82 } 83 84 } 85 | Popular Tags |