Package com.adobe.granite.logging
Interface LogAnalyser
-
@ProviderType public interface LogAnalyser
The log analyzer is a service making log entries available based on a configuration. By default all log messages with log level ERROR are recorded. Additional configurations can be provided through thesetLogConfiguration(LogConfigurationEntry[])
method. However, this configuration is not persisted and does not survive a restart.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<LogEntry>
getLastLogEntries(int size)
Get the last number of log entries.LogConfigurationEntry[]
getLogConfiguration()
Get the current log configurationvoid
setLogConfiguration(LogConfigurationEntry[] config)
Set the new configurations
-
-
-
Method Detail
-
getLogConfiguration
LogConfigurationEntry[] getLogConfiguration()
Get the current log configuration- Returns:
- An array of configurations. The array might have the length zero.
-
setLogConfiguration
void setLogConfiguration(LogConfigurationEntry[] config)
Set the new configurations- Parameters:
config
- An array of configurations ornull
to remove all configs.
-
getLastLogEntries
java.util.List<LogEntry> getLastLogEntries(int size)
Get the last number of log entries.- Parameters:
size
- The maximum number of log entries or-1
to get all available entries.- Returns:
- A list of log entries
-
-