|
@@ -25,33 +25,33 @@ namespace MySystem
|
|
|
//创建日志服务Client。
|
|
//创建日志服务Client。
|
|
|
private static ILogServiceClient client = BuildSimpleClient();
|
|
private static ILogServiceClient client = BuildSimpleClient();
|
|
|
|
|
|
|
|
- static async Task Main()
|
|
|
|
|
- {
|
|
|
|
|
- //创建Project。
|
|
|
|
|
- var proRes = await client.CreateProjectAsync(project, "des");
|
|
|
|
|
- check(proRes);
|
|
|
|
|
- Console.WriteLine("Create project success");
|
|
|
|
|
- Thread.Sleep(120 * 1000);
|
|
|
|
|
|
|
+ // static async Task Main()
|
|
|
|
|
+ // {
|
|
|
|
|
+ // //创建Project。
|
|
|
|
|
+ // var proRes = await client.CreateProjectAsync(project, "des");
|
|
|
|
|
+ // check(proRes);
|
|
|
|
|
+ // Console.WriteLine("Create project success");
|
|
|
|
|
+ // Thread.Sleep(120 * 1000);
|
|
|
|
|
|
|
|
- //创建Logstore。
|
|
|
|
|
- var storeRes = await client.CreateLogStoreAsync(logstore, 3, 2);
|
|
|
|
|
- check(storeRes);
|
|
|
|
|
- Console.WriteLine("Create logstore success");
|
|
|
|
|
- Thread.Sleep(10 * 1000);
|
|
|
|
|
|
|
+ // //创建Logstore。
|
|
|
|
|
+ // var storeRes = await client.CreateLogStoreAsync(logstore, 3, 2);
|
|
|
|
|
+ // check(storeRes);
|
|
|
|
|
+ // Console.WriteLine("Create logstore success");
|
|
|
|
|
+ // Thread.Sleep(10 * 1000);
|
|
|
|
|
|
|
|
- //为Logstore创建索引。
|
|
|
|
|
- var indRes = await client.CreateIndexAsync(logstore, new IndexLineInfo(new[] {' ', ','}));
|
|
|
|
|
- check(indRes);
|
|
|
|
|
- Console.WriteLine("Create Index success");
|
|
|
|
|
- Thread.Sleep(60 * 1000);
|
|
|
|
|
-
|
|
|
|
|
- //向Logstore写入数据。
|
|
|
|
|
- // await PostLogs();
|
|
|
|
|
- Console.WriteLine("Post logs success");
|
|
|
|
|
- Thread.Sleep(3000);
|
|
|
|
|
- //查询日志。
|
|
|
|
|
- await GetLogs();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // //为Logstore创建索引。
|
|
|
|
|
+ // var indRes = await client.CreateIndexAsync(logstore, new IndexLineInfo(new[] {' ', ','}));
|
|
|
|
|
+ // check(indRes);
|
|
|
|
|
+ // Console.WriteLine("Create Index success");
|
|
|
|
|
+ // Thread.Sleep(60 * 1000);
|
|
|
|
|
+
|
|
|
|
|
+ // //向Logstore写入数据。
|
|
|
|
|
+ // // await PostLogs();
|
|
|
|
|
+ // Console.WriteLine("Post logs success");
|
|
|
|
|
+ // Thread.Sleep(3000);
|
|
|
|
|
+ // //查询日志。
|
|
|
|
|
+ // await GetLogs();
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
public static async void CreateProject(string name, string detail)
|
|
public static async void CreateProject(string name, string detail)
|
|
|
{
|
|
{
|