com.ibm.mm.logging

Class ErrorFileHandler

  • java.lang.Object
    • java.util.logging.Handler
      • java.util.logging.StreamHandler
        • java.util.logging.FileHandler
          • com.ibm.mm.logging.ErrorFileHandler


  • public class ErrorFileHandler
    extends java.util.logging.FileHandler
    Separate file handler for ERROR and SEVERE logs only Helps in quickly identifying critical issues
    • Constructor Summary

      Constructors 
      Constructor and Description
      ErrorFileHandler()
      Creates a new ErrorFileHandler that only logs WARNING and above
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void publish(java.util.logging.LogRecord record)
      Override publish to filter out logs below WARNING level This ensures only errors are written to this file
      • Methods inherited from class java.util.logging.FileHandler

        close
      • Methods inherited from class java.util.logging.StreamHandler

        flush, isLoggable, setEncoding, setOutputStream
      • Methods inherited from class java.util.logging.Handler

        getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setErrorManager, setFilter, setFormatter, setLevel
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ErrorFileHandler

        public ErrorFileHandler()
                         throws java.io.IOException
        Creates a new ErrorFileHandler that only logs WARNING and above
        Throws:
        java.io.IOException - if unable to create log files
    • Method Detail

      • publish

        public void publish(java.util.logging.LogRecord record)
        Override publish to filter out logs below WARNING level This ensures only errors are written to this file
        Overrides:
        publish in class java.util.logging.FileHandler
Copyright © 2024 IBM Corporation

Copyright © 2024 IBM Corporation. All rights reserved.