Class XxlJobFileAppender

java.lang.Object
com.xxl.job.core.log.XxlJobFileAppender

public class XxlJobFileAppender extends Object
store trigger log in each log-file
Author:
xuxueli 2016-3-12 19:25:12
  • Constructor Details

    • XxlJobFileAppender

      public XxlJobFileAppender()
  • Method Details

    • initLogPath

      public static void initLogPath(String logPath)
    • getLogPath

      public static String getLogPath()
    • getGlueSrcPath

      public static String getGlueSrcPath()
    • makeLogFileName

      public static String makeLogFileName(Date triggerDate, long logId)
      log filename, like "logPath/yyyy-MM-dd/9999.log"
      Parameters:
      triggerDate -
      logId -
      Returns:
    • appendLog

      public static void appendLog(String logFileName, String appendLog)
      append log
      Parameters:
      logFileName -
      appendLog -
    • readLog

      public static LogResult readLog(String logFileName, int fromLineNum)
      support read log-file
      Parameters:
      logFileName -
      Returns:
      log content
    • readLines

      public static String readLines(File logFile)
      read log data
      Parameters:
      logFile -
      Returns:
      log line content