示例#1
0
        /// <summary>
        /// Flushes any items in the queue when shutting down an app
        /// </summary>
        public static void Shutdown()
        {
            //flush logs queue
            _LogClient.Close();

            //flush any remaining metrics as well
            MetricClient.StopMetricsQueue("Logger Shutdown called");
        }
示例#2
0
 protected override void OnClose()
 {
     try
     {
         _logClient.Close();
         StackifyLib.Internal.Metrics.MetricClient.StopMetricsQueue("log4net v1.2 OnClose");
     }
     catch
     {
     }
 }
示例#3
0
 protected override void CloseTarget()
 {
     try
     {
         StackifyLib.Utils.StackifyAPILogger.Log("NLog target closing");
         _logClient.Close();
         StackifyLib.Internal.Metrics.MetricClient.StopMetricsQueue("NLog CloseTarget");
     }
     catch (Exception ex)
     {
         StackifyLib.Utils.StackifyAPILogger.Log("NLog target closing error: " + ex.ToString());
     }
 }
示例#4
0
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            try
            {
                StackifyLib.Utils.StackifyAPILogger.Log("Serilog target closing");
                _logClient.Close();
                StackifyLib.Internal.Metrics.MetricClient.StopMetricsQueue("Serilog CloseTarget");
            }
            catch (Exception ex)
            {
                StackifyLib.Utils.StackifyAPILogger.Log("Serilog target closing error: " + ex.ToString());
            }
            _disposed = true;
        }