Log Service SDK for Java encapsulates all Java-based API operations of Log Service. You can write Java code to call the API operations.
Versions
For more information, see Alibaba Cloud Log Service SDK for Java Releases.
Sample code
Log Service SDK for Java provides a variety of sample code that you can use or reference.
The following table describes the sample code that is provided by Log Service SDK
for Java.
GitHub source code | Description |
---|---|
AlertSample.java | Includes sample code that shows how to manage operational alerts. |
DataSample.java | Includes sample code that shows how to pull log data. |
LogProject.java | Includes sample code that shows how to create a project. |
LoggingSample.java | Includes sample code that shows how to enable the audit logs feature. |
LogtailProfileSample.java | Includes sample code that shows how to query Logtail configurations. |
SavedSearchSample.java | Includes sample code that shows how to perform quick queries. |
ScmSample.java | Includes sample code that shows how to create Logstores, configuration files, machine groups, and indexes. The sample also shows how to grant permissions. |
ShardBalanceTool.java | Includes sample code that shows how to manage shards. |
ShipperSample.java | Includes sample code that shows how to ship logs. |
SlsSample.java | Includes sample code that shows how to query logs, write logs, and view the distribution of logs. |