Package org.wso2.carbon.logging.view.ui
Class LogViewerClient
java.lang.Object
org.wso2.carbon.logging.view.ui.LogViewerClient
This class serve requests coming from log view JSP pages.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLogViewerClient(String cookie, String backendServerURL, org.apache.axis2.context.ConfigurationContext configCtx) -
Method Summary
Modifier and TypeMethodDescriptionvoidClear all the logs in the buffer.downloadArchivedLogFiles(String logFile) voiddownloadArchivedLogFiles(String logFile, javax.servlet.http.HttpServletResponse response) Download log file with a given name.Take all the log events from buffer for the current tenant id.String[]This method will return tha application names can be found in logs.getImageName(String type) This method will return the matching image url for a given log level.getLocalLogFiles(int pageNumber, String tenantDomain, String serverKey) Get paginated list of log files in the repository/logs folder.String[]This method will return all supported log levels.getPaginatedApplicationLogEvents(int pageNumber, String type, String keyword, String applicationName) This method will return logs filtered by a given application name.getPaginatedLogEvents(int pageNumber, String type, String keyword) Get paginated log events filtered by type and search keyword.String[]booleanstatic booleanCheck whether the current tenant is valid.
-
Field Details
-
stub
public org.wso2.carbon.logging.view.stub.LogViewerStub stub
-
-
Constructor Details
-
Method Details
-
clearLogs
public void clearLogs()Clear all the logs in the buffer. -
getAllLogs
Take all the log events from buffer for the current tenant id.- Returns:
- List of log events.
-
getApplicationNames
This method will return tha application names can be found in logs.- Returns:
- List of application names.
-
getPaginatedApplicationLogEvents
public PaginatedLogEvent getPaginatedApplicationLogEvents(int pageNumber, String type, String keyword, String applicationName) This method will return logs filtered by a given application name.- Parameters:
pageNumber- pagination page number.type- log level.keyword- search keyword.applicationName- application name.- Returns:
- logEvent consist of logs filtered by an Application name.
-
getImageName
This method will return the matching image url for a given log level.- Parameters:
type- Log level.- Returns:
- matching image location.
-
isValidTenant
public static boolean isValidTenant()Check whether the current tenant is valid.- Returns:
- validity of the current tenant.
-
getPaginatedLogEvents
Get paginated log events filtered by type and search keyword.- Parameters:
pageNumber- pagination page number.type- log level.keyword- search keyword.- Returns:
- paginated log events.
-
getLocalLogFiles
Get paginated list of log files in the repository/logs folder.- Parameters:
pageNumber- page number.tenantDomain- tenant domain.serverKey- search keyword.- Returns:
- paginated list of log files.
-
isManager
public boolean isManager() -
getServiceNames
- Throws:
LogViewerException
-
getLogLevels
This method will return all supported log levels.- Returns:
- log levels as an array.
-
downloadArchivedLogFiles
- Throws:
LogViewerException
-
downloadArchivedLogFiles
public void downloadArchivedLogFiles(String logFile, javax.servlet.http.HttpServletResponse response) Download log file with a given name.- Parameters:
logFile- name of the log file.response- file download http response.
-