Package nxt.util

Class NxtLogManager


  • public class NxtLogManager
    extends java.util.logging.LogManager
    Java LogManager extension for use with Nxt
    • Field Summary

      • Fields inherited from class java.util.logging.LogManager

        LOGGING_MXBEAN_NAME
    • Constructor Summary

      Constructors 
      Constructor Description
      NxtLogManager()
      Create the Nxt log manager We will let the Java LogManager create its shutdown hook so that the shutdown context will be set up properly.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void readConfiguration​(java.io.InputStream inStream)
      Reconfigure logging support using a configuration file
      void reset()
      Reset the log handlers This method is called to reset the log handlers.
      • Methods inherited from class java.util.logging.LogManager

        addConfigurationListener, addLogger, checkAccess, getLogger, getLoggerNames, getLoggingMXBean, getLogManager, getProperty, readConfiguration, removeConfigurationListener, updateConfiguration, updateConfiguration
      • Methods inherited from class java.lang.Object

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

      • NxtLogManager

        public NxtLogManager()
        Create the Nxt log manager We will let the Java LogManager create its shutdown hook so that the shutdown context will be set up properly. However, we will intercept the reset() method so we can delay the actual shutdown until we are done terminating the Nxt processes.
    • Method Detail

      • readConfiguration

        public void readConfiguration​(java.io.InputStream inStream)
                               throws java.io.IOException,
                                      java.lang.SecurityException
        Reconfigure logging support using a configuration file
        Overrides:
        readConfiguration in class java.util.logging.LogManager
        Parameters:
        inStream - Input stream
        Throws:
        java.io.IOException - Error reading input stream
        java.lang.SecurityException - Caller does not have LoggingPermission("control")
      • reset

        public void reset()
        Reset the log handlers This method is called to reset the log handlers. We will forward the call during logging reconfiguration but will ignore it otherwise. This allows us to continue to use logging facilities during Nxt shutdown.
        Overrides:
        reset in class java.util.logging.LogManager