public final class Alerter extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Alerter.Callout |
static class |
Alerter.Severity |
| Constructor and Description |
|---|
Alerter(Boolean loggingEnabled,
String loggingLocation,
IdentityInformationProvider identityInfoProvider,
IAlertTracer tracer)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
alert(String headline,
String str,
Throwable e,
Alerter.Severity severity,
String classifier)
Log an alert
|
void |
alert(String str,
Throwable e,
Alerter.Severity severity)
Log an alert
|
void |
alert(String str,
Throwable e,
Alerter.Severity severity,
String classifier) |
void |
close()
Close an alerter
|
Alerter |
enableLogging(boolean val)
Enable/disable logging
|
String |
getLogName()
Get the name of the underlying log
|
boolean |
isLoggingEnabled()
Get if logging is enabled
|
void |
open(Alerter.Callout callout)
Open an alerter
|
void |
scheduleLogCompactionOnNextWrite()
Schedule a compaction on the underlying on the next write
|
void |
setLogCompactionThreshold(int val)
Set the compaction threshold on the underlying log
|
@Inject public Alerter(Boolean loggingEnabled, String loggingLocation, IdentityInformationProvider identityInfoProvider, IAlertTracer tracer)
public final String getLogName()
public final void open(Alerter.Callout callout) throws Exception
callout - A callout to be invoked whenever an alert is received. This
value can be null.Exceptionpublic final Alerter enableLogging(boolean val)
val - Specifies whether to switch logging on of off.
This method enables/disables logging (journalling) of alert messages. The method can be called at any time during the life of an alerter.
public final boolean isLoggingEnabled()
public final void setLogCompactionThreshold(int val)
throws Exception
val - The compaction threshold to set in gigabytes. A value of 0 will switch off compactionExceptionpublic final void scheduleLogCompactionOnNextWrite()
throws Exception
Exceptionpublic final void alert(String headline, String str, Throwable e, Alerter.Severity severity, String classifier)
public final void alert(String str, Throwable e, Alerter.Severity severity, String classifier)
public final void alert(String str, Throwable e, Alerter.Severity severity)
public final void close()
Copyright © 2016 Neeve Research, LLC. All Rights Reserved.