Beispiel #1
0
        /// <summary>
        /// Get The log status(histogram info) from sls server which match input
        /// parameters. All the logs with logstore and topic in [from, to) which
        /// contain the keys in query are the matched data.
        /// </summary>
        /// <param name="request">The get histograms request</param>
        /// <exception>LogException</exception>
        /// <returns>The get histograms response</returns>
        public GetHistogramsResponse GetHistograms(GetHistogramsRequest request)
        {
            ServiceRequest sReq = new ServiceRequest();

            sReq.Method   = HttpMethod.Get;
            sReq.Endpoint = BuildReqEndpoint(request);

            //use empty string to replace Logstore if not set by user explicitly
            string logstore = request.IsSetLogstore() ? request.Logstore : String.Empty;

            sReq.ResourcePath = LogConsts.RESOURCE_LOGSTORES + LogConsts.RESOURCE_SEPARATOR + logstore;

            FillCommonHeaders(sReq);
            FillCommonParameters(sReq);

            sReq.Parameters.Add(LogConsts.PARAMETER_TYPE, LogConsts.VALUE_TYPE_STATUS);

            if (request.IsSetTopic())
            {
                sReq.Parameters.Add(LogConsts.PARAMETER_TOPIC, request.Topic);
            }

            if (request.IsSetFrom())
            {
                sReq.Parameters.Add(LogConsts.PARAMETER_FROM, request.From.ToString());
            }

            if (request.IsSetTo())
            {
                sReq.Parameters.Add(LogConsts.PARAMETER_TO, request.To.ToString());
            }

            if (request.IsSetQuery())
            {
                sReq.Parameters.Add(LogConsts.PARAMETER_QUERY, request.Query);
            }

            ExecutionContext context = new ExecutionContext();

            context.Signer      = new LogRequestSigner(sReq.ResourcePath, HttpMethod.Get);
            context.Credentials = new ServiceCredentials(this.AccessKeyId, this.AccessKey);

            using (ServiceResponse response = serviceClient.Send(sReq, context))
            {
                LogClientTools.ResponseErrorCheck(response, context.Credentials);
                JArray body = LogClientTools.ParserResponseToJArray(response.Content);
                GetHistogramsResponse res = new GetHistogramsResponse(response.Headers, body);
                return(res);
            }
        }
        public void TestGetHistograms()
        {
            LogClient client = new LogClient(ClientTestData.TEST_ENDPOINT, ClientTestData.TEST_ACCESSKEYID, ClientTestData.TEST_ACCESSKEY);

            client.SetWebSend(MockSend);
            GetHistogramsRequest request = new GetHistogramsRequest();

            request.Project  = ClientTestData.TEST_PROJECT;
            request.Logstore = "testlogstore";
            request.Query    = "error";
            request.Topic    = "mockTopic";
            request.From     = 1000;
            request.To       = 2000;
            GetHistogramsResponse response = client.GetHistograms(request);

            Assert.IsTrue(DicToString(Headers).CompareTo("[x-sls-apiversion:0.4.0][x-sls-bodyrawsize:0][x-sls-signaturemethod:hmac-sha1][User-Agent:aliyun-sdk-dotnet/1.0.0.0]") == 0);
            Assert.IsTrue(response != null && response.TotalCount == 2);
            Assert.IsTrue(Host.CompareTo("mock_project.mockhost.aliyuncs.com") == 0);
            Assert.IsTrue(RequestUri.CompareTo("http://mock_project.mockhost.aliyuncs.com/logstores/testlogstore?type=histogram&topic=mockTopic&from=1000&to=2000&query=error") == 0);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            // select you endpoint https://help.aliyun.com/document_detail/29008.html
            String endpoint    = "cn-shanghai.log.aliyuncs.com",
                   accesskeyId = "",
                   accessKey   = "",
                   project     = "microex-test1",
                   logstore    = "test";
            LogClient client   = new LogClient(endpoint, accesskeyId, accessKey);

            //init http connection timeout
            client.ConnectionTimeout = client.ReadWriteTimeout = 10000;
            //list logstores
            foreach (String l in client.ListLogstores(new ListLogstoresRequest(project)).Logstores)
            {
                Console.WriteLine(l);
            }
            //put logs
            PutLogsRequest putLogsReqError = new PutLogsRequest();

            putLogsReqError.Project  = project;
            putLogsReqError.Topic    = "dotnet_topic";
            putLogsReqError.Logstore = logstore;
            putLogsReqError.LogItems = new List <LogItem>();
            for (int i = 1; i <= 10; ++i)
            {
                LogItem logItem = new LogItem();
                logItem.Time = DateUtils.TimeSpan();
                for (int k = 0; k < 10; ++k)
                {
                    logItem.PushBack("error_" + i.ToString(), "invalid operation");
                }
                putLogsReqError.LogItems.Add(logItem);
            }
            PutLogsResponse putLogRespError = client.PutLogs(putLogsReqError);

            Thread.Sleep(5000);

            //query logs, if query string is "", it means query all data
            GetLogsRequest getLogReq = new GetLogsRequest(project,
                                                          logstore,
                                                          DateUtils.TimeSpan() - 100,
                                                          DateUtils.TimeSpan(),
                                                          "dotnet_topic",
                                                          "",
                                                          100,
                                                          0,
                                                          false);
            GetLogsResponse getLogResp = client.GetLogs(getLogReq);

            Console.WriteLine("Log count : " + getLogResp.Logs.Count.ToString());
            for (int i = 0; i < getLogResp.Logs.Count; ++i)
            {
                var log = getLogResp.Logs[i];
                Console.WriteLine("Log time : " + DateUtils.GetDateTime(log.Time));
                for (int j = 0; j < log.Contents.Count; ++j)
                {
                    Console.WriteLine("\t" + log.Contents[j].Key + " : " + log.Contents[j].Value);
                }
                Console.WriteLine("");
            }

            //query histogram
            GetHistogramsResponse getHisResp = client.GetHistograms(new GetHistogramsRequest(project,
                                                                                             logstore,
                                                                                             DateUtils.TimeSpan() - 100,
                                                                                             DateUtils.TimeSpan(),
                                                                                             "dotnet_topic",
                                                                                             ""));

            Console.WriteLine("Histograms total count : " + getHisResp.TotalCount.ToString());

            //list shards
            ListShardsResponse listResp = client.ListShards(new ListShardsRequest(project, logstore));

            Console.WriteLine("Shards count : " + listResp.Shards.Count.ToString());

            //batch get logs
            for (int i = 0; i < listResp.Shards.Count; ++i)
            {
                //get cursor
                String cursor = client.GetCursor(new GetCursorRequest(project, logstore, listResp.Shards[i], ShardCursorMode.BEGIN)).Cursor;
                Console.WriteLine("Cursor : " + cursor);
                BatchGetLogsResponse batchGetResp = client.BatchGetLogs(new BatchGetLogsRequest(project, logstore, listResp.Shards[i], cursor, 10));
                Console.WriteLine("Batch get log, shard id : " + listResp.Shards[i].ToString() + ", log count : " + batchGetResp.LogGroupList.LogGroupList_Count.ToString());
            }
        }
        public void FT()
        {
            LogClient client = new LogClient("sls-failover.alibaba-inc.com", "", "");
            uint      topicFlag = DateUtils.TimeSpan();
            int       PUT_COUNT = 20, TOPIC_COUNT = 10, LOGITEM_COUNT = 20, CONTENT_COUNT = 10, SLEEP_INTERVAL = 2, SLEEP_TIME = 500;

            for (int j = 1; j <= PUT_COUNT; ++j)
            {
                PutLogsRequest putLogsReqError = new PutLogsRequest();
                putLogsReqError.Project  = "ali-winlogtail-project";
                putLogsReqError.Topic    = "dotnet_topic_" + topicFlag + "_" + (j % TOPIC_COUNT);
                putLogsReqError.Logstore = "sls-logstore-002";
                putLogsReqError.LogItems = new List <LogItem>();
                for (int i = 1; i <= LOGITEM_COUNT; ++i)
                {
                    LogItem logItem = new LogItem();
                    logItem.Time = (uint)(topicFlag + j);
                    for (int k = 0; k < CONTENT_COUNT; ++k)
                    {
                        logItem.PushBack("error_" + (j % TOPIC_COUNT) + "_" + k, "invalid operation: " + i * j);
                    }
                    putLogsReqError.LogItems.Add(logItem);
                }
                PutLogsResponse putLogRespError = client.PutLogs(putLogsReqError);
                if (j % SLEEP_INTERVAL == 0)
                {
                    Thread.Sleep(SLEEP_TIME);
                }
            }
            Thread.Sleep(50 * 1000);

            ListLogstoresRequest req = new ListLogstoresRequest();

            req.Project = "ali-winlogtail-project";
            ListLogstoresResponse res          = client.ListLogstores(req);
            HashSet <String>      logstoresSet = new HashSet <string>(res.Logstores);

            Assert.IsTrue(logstoresSet.Contains("sls-logstore-002"));


            ListTopicsRequest topicReq = new ListTopicsRequest();

            topicReq.Project  = "ali-winlogtail-project";
            topicReq.Logstore = "sls-logstore-002";
            topicReq.Lines    = TOPIC_COUNT;
            topicReq.Token    = "dotnet_topic_" + topicFlag + "_";
            ListTopicsResponse lstTopicsRequest = client.ListTopics(topicReq);

            Assert.IsTrue(lstTopicsRequest.Count >= TOPIC_COUNT);
            HashSet <String> topicSet = new HashSet <string>(lstTopicsRequest.Topics);

            for (int i = 0; i < TOPIC_COUNT; ++i)
            {
                Assert.IsTrue(topicSet.Contains("dotnet_topic_" + topicFlag + "_" + i));
            }
            Thread.Sleep(SLEEP_TIME);
            for (int i = 0; i < TOPIC_COUNT; ++i)
            {
                GetHistogramsRequest histReq = new GetHistogramsRequest();
                histReq.Project  = "ali-winlogtail-project";
                histReq.Logstore = "sls-logstore-002";
                histReq.Topic    = "dotnet_topic_" + topicFlag + "_" + i;
                histReq.To       = (uint)(topicFlag + PUT_COUNT + 1);
                histReq.From     = (uint)topicFlag;
                GetHistogramsResponse histResp = client.GetHistograms(histReq);
                Assert.IsTrue(histResp.TotalCount == (PUT_COUNT / TOPIC_COUNT) * LOGITEM_COUNT);
                if ((i + 1) % SLEEP_INTERVAL == 0)
                {
                    Thread.Sleep(SLEEP_TIME);
                }
            }
            Thread.Sleep(SLEEP_TIME);
            for (int i = 0; i < TOPIC_COUNT; ++i)
            {
                for (int k = 0; k < 2; ++k)
                {
                    GetHistogramsRequest histReq = new GetHistogramsRequest();
                    histReq.Project  = "ali-winlogtail-project";
                    histReq.Logstore = "sls-logstore-002";
                    histReq.Topic    = "dotnet_topic_" + topicFlag + "_" + i;
                    histReq.Query    = "error_" + i + "_" + k;
                    histReq.To       = (uint)(topicFlag + PUT_COUNT + 1);
                    histReq.From     = (uint)topicFlag;
                    GetHistogramsResponse histResp = client.GetHistograms(histReq);
                    Assert.IsTrue(histResp.TotalCount == (PUT_COUNT / TOPIC_COUNT) * LOGITEM_COUNT);
                    if ((k + 1) * (i + 1) % SLEEP_INTERVAL == 0)
                    {
                        Thread.Sleep(SLEEP_TIME);
                    }
                }
            }
            Thread.Sleep(SLEEP_TIME);
            for (int i = 0; i < TOPIC_COUNT; ++i)
            {
                GetLogsRequest getLogsReq = new GetLogsRequest();
                getLogsReq.Project  = "ali-winlogtail-project";
                getLogsReq.Logstore = "sls-logstore-002";
                getLogsReq.Topic    = "dotnet_topic_" + topicFlag + "_" + i;
                getLogsReq.Lines    = 120;
                getLogsReq.To       = (uint)(topicFlag + PUT_COUNT + 1);
                getLogsReq.From     = (uint)topicFlag;
                GetLogsResponse getLogsResp = client.GetLogs(getLogsReq);
                Assert.IsTrue(getLogsResp.Count == (PUT_COUNT / TOPIC_COUNT) * LOGITEM_COUNT);
                String logs = getLogsResp.Print();
                for (int m = 0; m < CONTENT_COUNT; ++m)
                {
                    String dstStr = "error_" + i + "_" + m;
                    Assert.IsTrue(ChildStringOccurTimes(logs, dstStr) == getLogsResp.Count);
                }
                if ((i + 1) % SLEEP_INTERVAL == 0)
                {
                    Thread.Sleep(SLEEP_TIME);
                }
            }
            Thread.Sleep(SLEEP_TIME);
            for (int i = 0; i < TOPIC_COUNT; ++i)
            {
                for (int k = 0; k < 2; ++k)
                {
                    GetLogsRequest getLogsReq = new GetLogsRequest();
                    getLogsReq.Project  = "ali-winlogtail-project";
                    getLogsReq.Logstore = "sls-logstore-002";
                    getLogsReq.Topic    = "dotnet_topic_" + topicFlag + "_" + i;
                    getLogsReq.Query    = "error_" + i + "_" + k;
                    getLogsReq.Lines    = 120;
                    getLogsReq.To       = (uint)(topicFlag + PUT_COUNT + 1);
                    getLogsReq.From     = (uint)topicFlag;
                    GetLogsResponse getLogsResp = client.GetLogs(getLogsReq);
                    Assert.IsTrue(getLogsResp.Count == (PUT_COUNT / TOPIC_COUNT) * LOGITEM_COUNT);
                    String logs = getLogsResp.Print();
                    for (int m = 0; m < CONTENT_COUNT; ++m)
                    {
                        String dstStr = "error_" + i + "_" + m;
                        Assert.IsTrue(ChildStringOccurTimes(logs, dstStr) == getLogsResp.Count);
                    }
                    if ((k + 1) * (i + 1) % SLEEP_INTERVAL == 0)
                    {
                        Thread.Sleep(SLEEP_TIME);
                    }
                }
            }
            Console.WriteLine();
        }
Beispiel #5
0
        private static void Test2()
        {
            string endpoint        = "http://cn-shenzhen.log.aliyuncs.com"; //选择与上面步骤创建 project 所属区域匹配的日志服务 Endpoint
            string accessKeyId     = "LTAIAEMVSMtDaRcn";                    //使用你的阿里云访问秘钥 AccessKeyId
            string accessKeySecret = "u6CgiFiWd6ahL8ux4fRd7tWmiHmDhH";      //使用你的阿里云访问秘钥 AccessKeySecret
            string project         = "henry-hyh-logservice";                //上面步骤创建的项目名称
            string logstore        = "henry-hyh-logstore";                  //上面步骤创建的日志库名称

            //构建一个客户端实例
            LogClient client = new LogClient(endpoint, accessKeyId, accessKeySecret);
            //列出当前 project 下的所有日志库名称
            ListLogstoresResponse res1 = client.ListLogstores(new ListLogstoresRequest(project));

            Console.WriteLine("Totoal logstore number is " + res1.Count);
            foreach (string name in res1.Logstores)
            {
                Console.WriteLine(name);
            }

            DateTime unixTimestampZeroPoint = new DateTime(1970, 01, 01, 0, 0, 0, DateTimeKind.Utc);
            //写入日志
            List <LogItem> logs = new List <LogItem>();

            for (int i = 0; i < 5; i++)
            {
                LogItem item = new LogItem();
                item.Time = (uint)((DateTime.UtcNow - unixTimestampZeroPoint).TotalSeconds);
                item.PushBack("CTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff", System.Globalization.DateTimeFormatInfo.InvariantInfo));
                item.PushBack("Index", i.ToString());
                logs.Add(item);
            }
            string          topic  = "hello.topic"; //选择合适的日志主题
            string          source = "localhost";   //选择合适的日志来源(如 IP 地址)
            PutLogsResponse res4   = client.PutLogs(new PutLogsRequest(project, logstore, topic, source, logs));

            Console.WriteLine("Request ID for PutLogs: " + res4.GetRequestId());

            //等待 1 分钟让日志可查询
            // System.Threading.Thread.Sleep(60 * 1000);
            System.Threading.Thread.Sleep(5 * 1000);

            DateTime fromStamp = DateTime.UtcNow - new TimeSpan(0, 10, 0);
            DateTime toStamp   = DateTime.UtcNow;
            uint     from      = (uint)((fromStamp - unixTimestampZeroPoint).TotalSeconds);
            uint     to        = (uint)((toStamp - unixTimestampZeroPoint).TotalSeconds);
            var      query     = "Index";

            //查询日志分布情况
            GetHistogramsResponse res2 = null;

            do
            {
                res2 = client.GetHistograms(new GetHistogramsRequest(project, logstore, from, to));
            } while ((res2 != null) && (!res2.IsCompleted()));
            Console.WriteLine("Total count of logs is " + res2.TotalCount);
            foreach (Histogram ht in res2.Histograms)
            {
                Console.WriteLine(string.Format("from {0}, to {1}, count {2}.", ht.From, ht.To, ht.Count));
            }

            //查询日志数据
            GetLogsResponse res3 = null;

            do
            {
                res3 = client.GetLogs(new GetLogsRequest(project, logstore, from, to, string.Empty, query, 5, 0, true));
            } while ((res3 != null) && (!res3.IsCompleted()));
            Console.WriteLine("Have gotten logs...");
            foreach (QueriedLog log in res3.Logs)
            {
                Console.WriteLine("----{0}, {1}---", log.Time, log.Source);
                for (int i = 0; i < log.Contents.Count; i++)
                {
                    Console.WriteLine("{0} --> {1}", log.Contents[i].Key, log.Contents[i].Value);
                }
            }

            Console.WriteLine("Finish");
            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            String endpoint        = "cn-hangzhou.log.aliyuncs.com";   //选择与上面步骤创建 project 所属区域匹配的日志服务 Endpoint
            String accessKeyId     = "yacNT1obW34STZCL";               //使用你的阿里云访问秘钥 AccessKeyId
            String accessKeySecret = "K4JY48aALclGK8iZ082B4MPLLfy2BN"; //使用你的阿里云访问秘钥 AccessKeySecret
            String project         = "chekongbao";                     //上面步骤创建的项目名称
            String logstore        = "ckb_log";                        //上面步骤创建的日志库名称

            //构建一个客户端实例
            SLSClient client = new SLSClient(endpoint, accessKeyId, accessKeySecret);
            //列出当前 project 下的所有日志库名称
            ListLogstoresResponse res1 = client.ListLogstores(new ListLogstoresRequest(project));

            Console.WriteLine("Totoal logstore number is " + res1.Count);
            foreach (String name in res1.Logstores)
            {
                Console.WriteLine(name);
            }


            DateTime unixTimestampZeroPoint = new DateTime(1970, 01, 01, 0, 0, 0, DateTimeKind.Utc);
            //写入日志
            List <LogItem> logs = new List <LogItem>();

            for (int i = 0; i < 5; i++)
            {
                LogItem item = new LogItem();
                item.Time = (uint)((DateTime.UtcNow - unixTimestampZeroPoint).TotalSeconds);
                item.PushBack("index", i.ToString());
                logs.Add(item);
            }

            String          topic  = String.Empty; //选择合适的日志主题
            String          source = "localhost";  //选择合适的日志来源(如 IP 地址)
            PutLogsResponse res4   = client.PutLogs(new PutLogsRequest(project, logstore, topic, source, logs));

            Console.WriteLine("Request ID for PutLogs: " + res4.GetRequestId());
            //等待 1 分钟让日志可查询
            System.Threading.Thread.Sleep(60 * 1000);
            //查询日志分布情况
            DateTime fromStamp         = DateTime.UtcNow - new TimeSpan(0, 10, 0);
            DateTime toStamp           = DateTime.UtcNow;
            uint     from              = (uint)((fromStamp - unixTimestampZeroPoint).TotalSeconds);
            uint     to                = (uint)((toStamp - unixTimestampZeroPoint).TotalSeconds);
            GetHistogramsResponse res2 = null;

            do
            {
                res2 = client.GetHistograms(new GetHistogramsRequest(project, logstore, from, to));
            } while ((res2 != null) && (!res2.IsCompleted()));
            Console.WriteLine("Total count of logs is " + res2.TotalCount);
            foreach (Histogram ht in res2.Histograms)
            {
                Console.WriteLine(String.Format("from {0}, to {1}, count {2}.", ht.From, ht.To, ht.Count));
            }
            //查询日志数据
            GetLogsResponse res3 = null;

            do
            {
                res3 = client.GetLogs(new GetLogsRequest(project, logstore, from, to, String.Empty, String.Empty, 5, 0, true));
            } while ((res3 != null) && (!res3.IsCompleted()));
            Console.WriteLine("Have gotten logs...");
            foreach (QueriedLog log in res3.Logs)
            {
                Console.WriteLine("----{0}, {1}---", log.Time, log.Source);
                for (int i = 0; i < log.Contents.Count; i++)
                {
                    Console.WriteLine("{0} --> {1}", log.Contents[i].Key, log.Contents[i].Value);
                }
            }
            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            // select you endpoint https://help.aliyun.com/document_detail/29008.html
            String endpoint    = "http://cn-hangzhou.log.aliyuncs.com",
                   accesskeyId = "", //阿里云授权id
                   accessKey   = "", //阿里云授权Key
                   project     = "", //项目名称,每个项目可以创建10个日志库
                   logstore    = ""; //日志库
            //int shardId = 0;//分区id
            LogClient client = new LogClient(endpoint, accesskeyId, accessKey);

            //init http connection timeout
            client.ConnectionTimeout = client.ReadWriteTimeout = 10000;
            //list logstores
            foreach (String l in client.ListLogstores(new ListLogstoresRequest(project)).Logstores)
            {
                Console.WriteLine(l);
            }
            //put logs
            PutLogsRequest putLogsReqError = new PutLogsRequest
            {
                Project  = project,
                Topic    = "dotnet_topic",
                Logstore = logstore,
                LogItems = new List <LogItem>()
            };

            for (int i = 1; i <= 10; ++i)
            {
                LogItem logItem = new LogItem {
                    Time = DateUtils.TimeSpan()
                };
                for (int k = 0; k < 10; ++k)
                {
                    logItem.PushBack("info", "GetLogs 接口查询指定 Project 下某个 Logstore 中的日志数据。还可以通过指定相关参数仅查询符合指定条件的日志数据。");
                }
                putLogsReqError.LogItems.Add(logItem);
            }
            PutLogsResponse putLogRespError = client.PutLogs(putLogsReqError);

            Thread.Sleep(5000);

            //query logs, if query string is "", it means query all data
            GetLogsRequest getLogReq = new GetLogsRequest(project,
                                                          logstore,
                                                          DateUtils.TimeSpan() - 100,
                                                          DateUtils.TimeSpan(),
                                                          "dotnet_topic",
                                                          "",
                                                          100,
                                                          0,
                                                          false);
            GetLogsResponse getLogResp = client.GetLogs(getLogReq);

            Console.WriteLine("Log count : " + getLogResp.Logs.Count.ToString());
            for (int i = 0; i < getLogResp.Logs.Count; ++i)
            {
                var log = getLogResp.Logs[i];
                Console.WriteLine("Log time : " + DateUtils.GetDateTime(log.Time));
                for (int j = 0; j < log.Contents.Count; ++j)
                {
                    Console.WriteLine("\t" + log.Contents[j].Key + " : " + log.Contents[j].Value);
                }
                Console.WriteLine("");
            }

            //query histogram
            GetHistogramsResponse getHisResp = client.GetHistograms(new GetHistogramsRequest(project,
                                                                                             logstore,
                                                                                             DateUtils.TimeSpan() - 100,
                                                                                             DateUtils.TimeSpan(),
                                                                                             "dotnet_topic",
                                                                                             ""));

            Console.WriteLine("Histograms total count : " + getHisResp.TotalCount.ToString());

            //list shards
            ListShardsResponse listResp = client.ListShards(new ListShardsRequest(project, logstore));

            Console.WriteLine("Shards count : " + listResp.Shards.Count.ToString());

            //batch get logs
            for (int i = 0; i < listResp.Shards.Count; ++i)
            {
                //get cursor
                String cursor = client.GetCursor(new GetCursorRequest(project, logstore, listResp.Shards[i], ShardCursorMode.BEGIN)).Cursor;
                Console.WriteLine("Cursor : " + cursor);
                BatchGetLogsResponse batchGetResp = client.BatchGetLogs(new BatchGetLogsRequest(project, logstore, listResp.Shards[i], cursor, 10));
                Console.WriteLine("Batch get log, shard id : " + listResp.Shards[i].ToString() + ", log count : " + batchGetResp.LogGroupList.LogGroupList_Count.ToString());
            }

            Console.ReadKey();
        }