Package io.hawt.log.support
Interface LogQuerySupportMBean
-
- All Known Implementing Classes:
LogQueryBase,LogQuerySupport
public interface LogQuerySupportMBeanAn MBean for querying log events which has a serialized API and a simple JSON API to avoid serialization issues
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LogResultsallLogResults()Returns all the available recent log events as aLogResultsobject which is then serializedjava.lang.StringfilterLogEvents(java.lang.String jsonFiler)Filters the list of log events using the JSON encoding ofLogFilterjava.lang.StringgetJavaDoc(java.lang.String mavenCoordinates, java.lang.String filePath)Returns the javadoc file for the given maven coordinates and filePathjava.lang.StringgetLogEvents(int count)Returns the recent log events as JSONLogResultsgetLogResults(int count)Returns the recent log events as aLogResultsobject which is then serializedjava.lang.StringgetSource(java.lang.String mavenCoordinates, java.lang.String className, java.lang.String filePath)Returns the source file for the given maven coordinates so that we can link log messages to source codeLogResultsjsonQueryLogResults(java.lang.String jsonFilter)Allows a JSON filter to be specified then returns the log results as a serialised objectLogResultslogResultsSince(long time)Returns all the available log events since the given timestamp (millis)LogResultsqueryLogResults(LogFilter filter)Queries the log results using the given filter
-
-
-
Method Detail
-
allLogResults
LogResults allLogResults() throws java.io.IOException
Returns all the available recent log events as aLogResultsobject which is then serialized- Returns:
- the log events as a serialized object
- Throws:
java.io.IOException
-
logResultsSince
LogResults logResultsSince(long time) throws java.io.IOException
Returns all the available log events since the given timestamp (millis)- Returns:
- the log events as a serialized object
- Throws:
java.io.IOException
-
getLogResults
LogResults getLogResults(int count) throws java.io.IOException
Returns the recent log events as aLogResultsobject which is then serialized- Parameters:
count- maximum number to return o <0 for all of them- Returns:
- the log events as a serialized object
- Throws:
java.io.IOException
-
queryLogResults
LogResults queryLogResults(LogFilter filter)
Queries the log results using the given filter- Parameters:
filter- the filter to apply to the logs- Returns:
- the log events as a serialized object
-
getSource
java.lang.String getSource(java.lang.String mavenCoordinates, java.lang.String className, java.lang.String filePath) throws java.io.IOExceptionReturns the source file for the given maven coordinates so that we can link log messages to source code- Parameters:
mavenCoordinates- is a string of the form "groupId:artifactId:version". For some uber bundles this can be a space separated list.- Throws:
java.io.IOException
-
getJavaDoc
java.lang.String getJavaDoc(java.lang.String mavenCoordinates, java.lang.String filePath) throws java.io.IOExceptionReturns the javadoc file for the given maven coordinates and filePath- Parameters:
mavenCoordinates- is a string of the form "groupId:artifactId:version". For some uber bundles this can be a space separated list.- Throws:
java.io.IOException
-
getLogEvents
java.lang.String getLogEvents(int count) throws java.io.IOExceptionReturns the recent log events as JSON- Parameters:
count- maximum number to return o <0 for all of them- Returns:
- the log events as a blob of JSON using
LogEvent - Throws:
java.io.IOException
-
filterLogEvents
java.lang.String filterLogEvents(java.lang.String jsonFiler) throws java.io.IOExceptionFilters the list of log events using the JSON encoding ofLogFilter- Returns:
- the log events as a blob of JSON using
LogEvent - Throws:
java.io.IOException
-
jsonQueryLogResults
LogResults jsonQueryLogResults(java.lang.String jsonFilter) throws java.io.IOException
Allows a JSON filter to be specified then returns the log results as a serialised object- Throws:
java.io.IOException
-
-