Class LogService
- java.lang.Object
-
- org.apache.log4j.AppenderSkeleton
-
- org.apache.accumulo.server.monitor.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 Summary
Constructors Constructor Description LogService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
append(org.apache.log4j.spi.LoggingEvent ev)
void
clear()
void
close()
void
doAppend(org.apache.log4j.spi.LoggingEvent event)
List<DedupedLogEvent>
getEvents()
static LogService
getInstance()
boolean
requiresLayout()
static void
startLogListener(AccumuloConfiguration conf, String instanceId, String hostAddress)
Place the host:port advertisement for the Monitor's Log4j listener in ZooKeeper
-
-
-
Method Detail
-
startLogListener
public static void startLogListener(AccumuloConfiguration conf, String instanceId, String hostAddress)
Place the host:port advertisement for the Monitor's Log4j listener in ZooKeeper- Parameters:
conf
- configuration for the instanceinstanceId
- instanceId for the instancehostAddress
- 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 classorg.apache.log4j.AppenderSkeleton
-
close
public void close()
-
doAppend
public void doAppend(org.apache.log4j.spi.LoggingEvent event)
- Specified by:
doAppend
in interfaceorg.apache.log4j.Appender
- Overrides:
doAppend
in classorg.apache.log4j.AppenderSkeleton
-
requiresLayout
public boolean requiresLayout()
-
getEvents
public List<DedupedLogEvent> getEvents()
-
clear
public void clear()
-
-