public static void markErrorLogFile(String username) { String message = getMarkMessage(username); error(message); }
public static void markDebugLogFile(String username) { String message = getMarkMessage(username); debug(message); }
public static void rotateDebugLogFile() { // SLF4J doesn't provide a hook into the logging implementation. We'll have to do this 'direct', bypassing slf4j. File logFile = new File(Log.getLogDirectory(), "debug.log"); emptyFile(logFile); }
public static void markInfoLogFile(String username) { String message = getMarkMessage(username); info(message); }
/** * @deprecated replaced by {@link org.slf4j.Logger#error(String)}. * Functionality of this method is delegated there. */ @Deprecated public static void error(String s) { if (isErrorEnabled()) { Logger.error(s); if (isDebugEnabled()) { printToStdErr(s, null); } } }
public static Logger initializeConsoleLogger(Logger logger, String pattern, String logLevel) { try { if (!StringUtil.validString(logLevel)) { logLevel = GtmsLog.DEFAULT_LOG_LEVEL; } if (!StringUtil.validString(pattern) && ("ALL".equals(logLevel) || "DEBUG".equals(logLevel))) { pattern = GtmsLog.DEFAULT_DEBUG_CONVERSION_PATTERN; } ConsoleAppender appender = new ConsoleAppender(new PatternLayout(pattern)); logger.setLevel(Level.toLevel(logLevel, Level.toLevel(GtmsLog.DEFAULT_LOG_LEVEL))); logger.addAppender(appender); } catch (Exception e) { e.printStackTrace(); Log.error(e); } return logger; }
public static void markWarnLogFile(String username) { String message = getMarkMessage(username); warn(message); }
/** * @deprecated replaced by {@link org.slf4j.Logger#debug(String, Throwable)}. * Functionality of this method is delegated there. */ @Deprecated public static void debug(Throwable throwable) { if (isDebugEnabled()) { Logger.debug("", throwable); } }
/** * @deprecated replaced by {@link org.slf4j.Logger#warn(String, Throwable)}. * Functionality of this method is delegated there. */ @Deprecated public static void warn(Throwable throwable) { if (isWarnEnabled()) { Logger.warn("", throwable); } }
/** * @deprecated replaced by {@link org.slf4j.Logger#info(String, Throwable)}. * Functionality of this method is delegated there. */ @Deprecated public static void info(Throwable throwable) { if (isInfoEnabled()) { Logger.info("", throwable); } }
/** * @deprecated replaced by {@link org.slf4j.Logger#error(String, Throwable)}. * Functionality of this method is delegated there. */ @Deprecated public static void error(Throwable throwable) { if (isErrorEnabled()) { Logger.error("", throwable); if (isDebugEnabled()) { printToStdErr(null, throwable); } } }
public static Logger initializeLogger(String loggerName, String pattern, String logLevel, String filename) { Logger logger = Logger.getLogger(loggerName); try { if (!StringUtil.validString(logLevel)) { logLevel = GtmsLog.DEFAULT_LOG_LEVEL; } if ("ALL".equals(logLevel) || "DEBUG".equals(logLevel)) { pattern = JiveGlobals.getProperty(pattern, GtmsLog.DEFAULT_DEBUG_CONVERSION_PATTERN); } RollingFileAppender appender = new RollingFileAppender(new PatternLayout(pattern), GtmsLog.DEFAULT_LOG_DIR + "/" + filename + ".log"); logger.setLevel(Level.toLevel(logLevel, Level.toLevel(GtmsLog.DEFAULT_LOG_LEVEL))); logger.addAppender(appender); } catch (Exception e) { e.printStackTrace(); Log.error(e); } return logger; }
public static void markInfoLogFile(String username) { String message = getMarkMessage(username); info(message); }
public static void markWarnLogFile(String username) { String message = getMarkMessage(username); warn(message); }
/** * @deprecated replaced by {@link org.slf4j.Logger#debug(String, Throwable)}. * Functionality of this method is delegated there. */ @Deprecated public static void debug(String s, Throwable throwable) { if (isDebugEnabled()) { Logger.debug(s, throwable); } }
/** * @deprecated replaced by {@link org.slf4j.Logger#debug(String, Throwable)}. * Functionality of this method is delegated there. */ @Deprecated public static void warn(String s, Throwable throwable) { if (isWarnEnabled()) { Logger.warn(s, throwable); } }
/** * @deprecated replaced by {@link org.slf4j.Logger#info(String)}. * Functionality of this method is delegated there. */ @Deprecated public static void info(String s) { if (isInfoEnabled()) { Logger.info(s); } }
/** * @deprecated replaced by {@link org.slf4j.Logger#error(String, Throwable)}. * Functionality of this method is delegated there. */ @Deprecated public static void error(String s, Throwable throwable) { if (isErrorEnabled()) { Logger.error(s, throwable); if (isDebugEnabled()) { printToStdErr(s, throwable); } } }
public static void rotateAllLogFile() { // SLF4J doesn't provide a hook into the logging implementation. We'll have to do this 'direct', bypassing slf4j. File logFile = new File(Log.getLogDirectory(), "all.log"); emptyFile(logFile); }
public static void markErrorLogFile(String username) { String message = getMarkMessage(username); error(message); }