Package org.openremote.manager.syslog
Class SyslogService
java.lang.Object
java.util.logging.Handler
org.openremote.manager.syslog.SyslogService
- All Implemented Interfaces:
org.openremote.model.ContainerService
Act as a JUL handler, publishes (some) log messages on the client event bus, stores
(some, depending on
SyslogConfig) log messages in the database.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<org.openremote.model.syslog.SyslogEvent> protected ClientEventServiceprotected org.openremote.model.syslog.SyslogConfigprotected ScheduledFutureprotected ScheduledFuturestatic final Stringstatic final org.openremote.model.syslog.SyslogLevelstatic final Stringstatic final intprotected org.openremote.container.persistence.PersistenceServiceprotected ScheduledExecutorServiceFields inherited from interface org.openremote.model.ContainerService
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, MED_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()voidflush()protected voidorg.openremote.model.syslog.SyslogConfiggetEvents(org.openremote.model.syslog.SyslogLevel level, int perPage, int page, Instant from, Instant to, List<org.openremote.model.syslog.SyslogCategory> categories, List<String> subCategories) intvoidinit(org.openremote.model.Container container) voidprotected voidvoidsetConfig(org.openremote.model.syslog.SyslogConfig config) voidstart(org.openremote.model.Container container) voidstop(org.openremote.model.Container container) protected voidstore(org.openremote.model.syslog.SyslogEvent syslogEvent) toString()Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
Field Details
-
OR_SYSLOG_LOG_LEVEL
- See Also:
-
OR_SYSLOG_LOG_LEVEL_DEFAULT
public static final org.openremote.model.syslog.SyslogLevel OR_SYSLOG_LOG_LEVEL_DEFAULT -
OR_SYSLOG_MAX_AGE_DAYS
- See Also:
-
OR_SYSLOG_MAX_AGE_DAYS_DEFAULT
public static final int OR_SYSLOG_MAX_AGE_DAYS_DEFAULT- See Also:
-
scheduledExecutorService
-
persistenceService
protected org.openremote.container.persistence.PersistenceService persistenceService -
clientEventService
-
config
protected org.openremote.model.syslog.SyslogConfig config -
batch
-
flushBatchFuture
-
deleteOldFuture
-
-
Constructor Details
-
SyslogService
public SyslogService()
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceorg.openremote.model.ContainerService
-
init
- Specified by:
initin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
start
- Specified by:
startin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
purgeSyslog
protected void purgeSyslog() -
stop
- Specified by:
stopin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
flush
public void flush() -
close
- Specified by:
closein classHandler- Throws:
SecurityException
-
publish
-
setConfig
public void setConfig(org.openremote.model.syslog.SyslogConfig config) -
getConfig
public org.openremote.model.syslog.SyslogConfig getConfig() -
clearStoredEvents
public void clearStoredEvents() -
getEvents
-
store
protected void store(org.openremote.model.syslog.SyslogEvent syslogEvent) -
flushBatch
protected void flushBatch() -
toString
-