コード例 #1
0
        public void BasicUsage()
        {
            var config   = TestsHelper.GetConfiguration();
            var listener = new BlobTraceListener(
                config["AZURE_STORAGE_CONNECTIONSTRING"],
                config["AZURE_STORAGE_CONTAINER_NAME"]);

            listener.WriteLine("Hello world!");
            listener.Flush();
        }
コード例 #2
0
        public void OptionsUsage()
        {
            var config   = TestsHelper.GetConfiguration();
            var listener = new BlobTraceListener(
                config["AZURE_STORAGE_CONNECTIONSTRING"],
                config["AZURE_STORAGE_CONTAINER_NAME"],
                string.Empty,
                new BlobTraceListenerOptions
            {
                BackgroundScheduleTimeoutMs = 4000,
                FilenameFormat        = "yyyy/MM/dd/HH\\.\\l\\o\\g",
                MaxLogMessagesToQueue = 20000
            });

            listener.WriteLine("Hello world!");
            listener.Flush();
        }