1 package org.unicode.cldr.icu; 2 3 public interface ICULog { 4 public enum Level { 5 DEBUG, INFO, LOG, WARNING, ERROR; 6 } 7 willOutput(Level level)8 boolean willOutput(Level level); 9 setStatus(String status)10 void setStatus(String status); 11 debug(String msg)12 void debug(String msg); 13 info(String msg)14 void info(String msg); 15 log(String msg)16 void log(String msg); 17 warning(String msg)18 void warning(String msg); 19 error(String msg)20 void error(String msg); 21 error(String msg, Throwable t)22 void error(String msg, Throwable t); 23 24 /** 25 * Outputs and flushes text with no status or level message. 26 * Used for 'ticks' during long-running processes and 27 * compact output. 28 */ 29 public interface Emitter { 30 /** Outputs and flushes text, no newline */ emit(String text)31 void emit(String text); 32 33 /** Emits a newline */ nl()34 void nl(); 35 } 36 37 /** 38 * Returns an emitter. If the log will output at this level, 39 * the emitter will forward the text, otherwise it will silently 40 * ignore it. Use willOutput to see if the emitter will actually 41 * emit the text. 42 */ emitter(Level level)43 Emitter emitter(Level level); 44 } 45