Class LogService

  • All Implemented Interfaces:
    org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

    public class LogService
    extends org.apache.log4j.AppenderSkeleton
    Hijack log4j and capture log events for display.
    • Constructor Detail

      • LogService

        public LogService()
    • Method Detail

      • startLogListener

        public static void startLogListener​(ServerContext context,
                                            String hostAddress)
        Place the host:port advertisement for the Monitor's Log4j listener in ZooKeeper
        Parameters:
        context - Server context
        hostAddress - Address that monitor process is bound to
      • getInstance

        public static LogService getInstance()
      • append

        protected void append​(org.apache.log4j.spi.LoggingEvent ev)
        Specified by:
        append in class org.apache.log4j.AppenderSkeleton
      • close

        public void close()
      • doAppend

        public void doAppend​(org.apache.log4j.spi.LoggingEvent event)
        Specified by:
        doAppend in interface org.apache.log4j.Appender
        Overrides:
        doAppend in class org.apache.log4j.AppenderSkeleton
      • requiresLayout

        public boolean requiresLayout()
      • clear

        public void clear()