public class InMemoryLogProvider extends Object implements LogProvider
| Constructor and Description |
|---|
InMemoryLogProvider() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearLogs()
Do clear operation, eg: if it is a in memory log provider then this can be used to clear the
memory.
|
List<LogEvent> |
getAllLogs(String tenantDomain,
String serverKey)
Return a list of all the logs available under given domain and server key
|
List<String> |
getApplicationNames(String tenantDomain,
String serverKey)
Return a list of all application names deployed under provided tenant domain and server key
|
List<LogEvent> |
getLogs(String type,
String keyword,
String appName,
String tenantDomain,
String serverKey)
Returns a list of all LogEvents related to the given application, which match to given type
and LogEvent message has given key word with it.
|
List<LogEvent> |
getLogsByAppName(String appName,
String tenantDomain,
String serverKey)
Return a list of all the LogEvents belongs to the application, which is deployed under given
tenant domain and server key.
|
List<LogEvent> |
getSystemLogs()
Return a list of system LogEvents
|
void |
init(LoggingConfig loggingConfig)
Initialize the log provider by reading the property comes with logging configuration file
This will be called immediate after create new instance of ILogProvider
|
int |
logsCount(String tenantDomain,
String serverKey)
Return LogEvent count.
|
public void init(LoggingConfig loggingConfig)
init in interface LogProviderloggingConfig - - configuration class which read and keep configurationspublic List<String> getApplicationNames(String tenantDomain, String serverKey) throws LogViewerException
LogProvidergetApplicationNames in interface LogProvidertenantDomain - - Tenant domain eg: t1.comserverKey - - Server keyLogViewerExceptionpublic List<LogEvent> getSystemLogs() throws LogViewerException
LogProvidergetSystemLogs in interface LogProvidernull if no system LogEvents available.LogViewerExceptionpublic List<LogEvent> getAllLogs(String tenantDomain, String serverKey) throws LogViewerException
LogProvidergetAllLogs in interface LogProvidertenantDomain - - Tenant domain eg: t1.comserverKey - - server keyLogViewerExceptionpublic List<LogEvent> getLogsByAppName(String appName, String tenantDomain, String serverKey) throws LogViewerException
LogProvidergetLogsByAppName in interface LogProviderappName - - application nametenantDomain - - Tenant domain eg: t1.comserverKey - - Server keyLogViewerExceptionpublic List<LogEvent> getLogs(String type, String keyword, String appName, String tenantDomain, String serverKey) throws LogViewerException
LogProvidergetLogs in interface LogProvidertype - - Log type , eg: ALL , INFO , DEBUG etc ....keyword - - Key wordappName - - Application nametenantDomain - - Tenant domain eg: t1.comserverKey - - Server keyLogViewerExceptionpublic int logsCount(String tenantDomain, String serverKey) throws LogViewerException
LogProviderlogsCount in interface LogProvidertenantDomain - - Tenant domain eg: t1.comserverKey - - Server key0 if there is no LogEvent.LogViewerExceptionpublic boolean clearLogs()
LogProviderclearLogs in interface LogProvidertrue if clear operation success, false if not.Copyright © 2017 WSO2. All rights reserved.