public interface SimpleLogService
限定符和类型 | 方法和说明 |
---|---|
GetHistogramsResponse |
GetHistograms(GetHistogramsRequest request)
Get The log status(histogram info) from sls server which match input
parameters.
|
GetHistogramsResponse |
GetHistograms(String project,
String logstore,
int from,
int to,
String topic,
String query)
Get The log status(histogram info) from sls server which match input
parameters.
|
GetLogsResponse |
GetLogs(GetLogsRequest request)
Get The sub set of logs data from sls server which match input
parameters.
|
GetLogsResponse |
GetLogs(String project,
String logStore,
int from,
int to,
String topic,
String query)
Get The sub set of logs data from sls server which match input
parameters.
|
GetLogsResponse |
GetLogs(String project,
String logStore,
int from,
int to,
String topic,
String query,
int line,
int offset,
boolean reverse)
Get The sub set of logs data from sls server which match input
parameters.
|
ListLogStoresResponse |
ListLogStores(ListLogStoresRequest request)
Get all the logstore of a project
|
ListLogStoresResponse |
ListLogStores(String project)
Get all the logstore for the user
|
ListTopicsResponse |
ListTopics(ListTopicsRequest request)
Get the topics in the logtstore
|
ListTopicsResponse |
ListTopics(String project,
String logStore,
String token,
int line)
Get the topics in the logtstore
|
PutLogsResponse |
PutLogs(PutLogsRequest request)
Send Data to sls server
|
PutLogsResponse |
PutLogs(String project,
String logStore,
String topic,
List<LogItem> logItems,
String source)
Send Data to sls server
|
GetHistogramsResponse GetHistograms(String project, String logstore, int from, int to, String topic, String query) throws SlsException
project
- the project namelogstore
- the result data logstorefrom
- the begin time of the result data to getto
- the end time of the result data to gettopic
- the result data topicquery
- If the query is not empty, it will return the logs contain the
keys in query, if "all_hit" is contained in the query, only
the logs contains all the keys in query are matched logs,
other wise logs contain any key in query are matched logs.SlsException
- if any error happen when get the data from sls severNullPointerException
- if any parameter is nullIllegalArgumentException
- if project or logstore is emptyGetHistogramsResponse GetHistograms(GetHistogramsRequest request) throws SlsException
request
- the get histogram requestSlsException
- if any error happen when get the data from sls severNullPointerException
- if request parameter is nullGetLogsResponse GetLogs(String project, String logStore, int from, int to, String topic, String query) throws SlsException
project
- the project namelogStore
- the result data logstorefrom
- the begin time of the result data to getto
- the end time of the result data to gettopic
- the result data topicquery
- If the query is not empty, it will return the logs contain the
keys in query, if "all_hit" is contained in the query, only
the logs contains all the keys in query are matched logs,
other wise logs contain any key in query are matched logsSlsException
- if any error happen when get the data from sls severNullPointerException
- if any parameter is nullIllegalArgumentException
- if project or logstore is emptyGetLogsResponse GetLogs(String project, String logStore, int from, int to, String topic, String query, int line, int offset, boolean reverse) throws SlsException
project
- the project namelogStore
- the result data logstorefrom
- the begin time of the result data to getto
- the end time of the result data to gettopic
- the result data topicreverse
- a flag to determine the return data order, if reverse is set
to false, the return logs is ascending order by time, other
wise, it's descending orderline
- how many lines to get, the max lines is decided by
the sls backend serveroffset
- the start log index in all the matched logs.query
- If the query is not empty, it will return the logs contain the
keys in query, if "all_hit" is contained in the query, only
the logs contains all the keys in query are matched logs,
other wise logs contain any key in query are matched logs.SlsException
- if any error happen when get the data from sls severNullPointerException
- if any parameter is nullIllegalArgumentException
- if project or logstore is emptyGetLogsResponse GetLogs(GetLogsRequest request) throws SlsException
request
- the get logs requestNullPointerException
- if request parameter is nullSlsException
- if any error happen when get the data from sls severListLogStoresResponse ListLogStores(String project) throws SlsException
project
- the project nameSlsException
- if any error happen when get the data from sls severNullPointerException
- if any parameter is nullIllegalArgumentException
- if project or logstore is emptyListLogStoresResponse ListLogStores(ListLogStoresRequest request) throws SlsException
request
- the list log store requestSlsException
- if any error happen when get the data from sls severNullPointerException
- if request parameter is nullListTopicsResponse ListTopics(String project, String logStore, String token, int line) throws SlsException
project
- the project namelogStore
- where the topic belongs totoken
- all the returned topics are equal or larger than the given
token according to topics' lexicographical orderline
- the topic number from sls serverSlsException
- if any error happen when get the data from sls severNullPointerException
- if any parameter is nullIllegalArgumentException
- if project or logstore is emptyListTopicsResponse ListTopics(ListTopicsRequest request) throws SlsException
request
- the list topics requestSlsException
- if any error happen when get the data from sls severNullPointerException
- if request parameter is nullPutLogsResponse PutLogs(String project, String logStore, String topic, List<LogItem> logItems, String source) throws SlsException
project
- the project namelogStore
- the log store where the source data should be puttopic
- source data topiclogItems
- the log data to sendsource
- the source of the data, if the source is empty, it will be
reset to the host ipSlsException
- if any error happen when send data to the serverNullPointerException
- if any parameter is nullIllegalArgumentException
- if project or logstore is empty, or the logGroup log count
exceed 4096, or the total data size exceed 5MBPutLogsResponse PutLogs(PutLogsRequest request) throws SlsException
request
- the put log requestSlsException
- if any error happen when send data to the serverNullPointerException
- if any parameter is nullIllegalArgumentException
- if project or logstore is empty, or the logGroup log count
exceed 4096, or the total data size exceed 5MBCopyright © 2015. All Rights Reserved.