1 27 package org.webdocwf.util.loader.logging; 28 29 import java.io.IOException ; 30 31 32 75 public abstract class Logger { 76 77 80 public static final int LOGMODE_NORMAL = 1; 81 82 85 public static final int LOGMODE_NONE = 0; 86 87 90 public static final int LOGMODE_FULL = 2; 91 92 public static final String strLOGMODE_NONE = "NONE"; 93 public static final String strLOGMODE_NORMAL = "NORMAL"; 94 public static final String strLOGMODE_FULL = "FULL"; 95 96 public boolean[] enbledLogLevels; 97 98 101 protected static Logger centralLogger; 102 103 106 protected static final String [] standardLevelNames = { 107 strLOGMODE_NORMAL, strLOGMODE_NONE, strLOGMODE_FULL }; 111 112 120 public static Logger getCentralLogger() { 121 return centralLogger; 122 } 123 124 131 abstract public void configure(String confFilePath) throws Exception ; 132 133 143 abstract public boolean isEnabled(int level); 144 145 155 abstract public boolean isEnabled(String level); 156 157 163 abstract public int getLevel(String level); 164 165 166 172 abstract public void write(int level, String msg); 173 174 180 abstract public void write(String level, String msg); 181 182 189 abstract public void write(int level, String msg, Throwable throwable); 190 191 198 abstract public void write(String level, String msg, Throwable throwable); 199 200 abstract public boolean[] getEnabledLogLevels(); 201 202 abstract public void setEnabledLogLevels(String logMode); 203 204 abstract public boolean setMessage(String key, String value); 205 206 abstract public String getMessage(String key); 207 208 abstract public boolean writeEcho (String strLogTxt); 209 210 abstract public void close(); 211 } 212 213 | Popular Tags |