Class GFFileHandler

    • Constructor Detail

      • GFFileHandler

        public GFFileHandler()
    • Method Detail

      • postConstruct

        public void postConstruct()
        Specified by:
        postConstruct in interface org.glassfish.hk2.api.PostConstruct
      • evaluateFileName

        protected String evaluateFileName()
      • preDestroy

        public void preDestroy()
        Specified by:
        preDestroy in interface org.glassfish.hk2.api.PreDestroy
      • getCurrentLogFile

        public File getCurrentLogFile()
        A simple getter to access the current log file written by this FileHandler.
        Specified by:
        getCurrentLogFile in interface LoggingRuntime
        Returns:
      • cleanUpHistoryLogFiles

        public void cleanUpHistoryLogFiles()
        cleanup the history log file based on attributes set under logging.properties file".

        If it is defined with valid number, we only keep that number of history logfiles; If "max_history_files" is defined without value, then default that number to be 10; If "max_history_files" is defined with value 0, any number of history files are kept.

      • rotate

        public void rotate()
        A Simple rotate method to close the old file and start the new one when the limit is reached.
      • log

        public void log()
        5005 Retrieves the LogRecord from our Queue and store them in the file
      • publish

        public void publish​(LogRecord record)
        Publishes the logrecord storing it in our queue
        Overrides:
        publish in class StreamHandler
      • getLogFileName

        protected File getLogFileName()
      • addLogEventListener

        public boolean addLogEventListener​(LogEventListener listener)
      • removeLogEventListener

        public boolean removeLogEventListener​(LogEventListener listener)
      • setLogFile

        public void setLogFile​(String fileName)
      • setLogToFile

        public void setLogToFile​(boolean logToFile)
      • setRotationOnDateChange

        public void setRotationOnDateChange​(boolean rotationOnDateChange)
      • setMultiLineMode

        public void setMultiLineMode​(boolean multiLineMode)
      • setFileHandlerFormatter

        public void setFileHandlerFormatter​(String fileHandlerFormatter)
      • setExcludeFields

        public void setExcludeFields​(String excludeFields)
      • setRotationLimitAttrValue

        public void setRotationLimitAttrValue​(Integer rotationLimitAttrValue)
      • setRotationTimeLimitValue

        public void setRotationTimeLimitValue​(Long rotationTimeLimitValue)
      • setMaxHistoryFiles

        public void setMaxHistoryFiles​(int maxHistoryFiles)
      • setFlushFrequency

        public void setFlushFrequency​(int flushFrequency)
      • setCompressionOnRotation

        public void setCompressionOnRotation​(boolean compressionOnRotation)
      • setLogStandardStreams

        public void setLogStandardStreams​(boolean logStandardStreams)