Пример #1
0
        static void Main(string[] args)
        {
            var logDetail = GetLogDetail("Starting app", null);

            CLogger.WriteDiagnostic(logDetail);

            var tracker = new PerfTracker("FloggerConsole_Execution", "", logDetail.UserName,
                                          logDetail.Location, logDetail.Product, logDetail.Layer);

            try
            {
                var ex = new Exception("Something bad has happened!");
                ex.Data.Add("input param", "nothing to see here");
                throw ex;
            }
            catch (Exception ex)
            {
                logDetail = GetLogDetail("", ex);
                CLogger.WriteError(logDetail);
            }

            logDetail = GetLogDetail("used flogging console", null);
            CLogger.WriteUsage(logDetail);

            logDetail = GetLogDetail("stopping app", null);
            CLogger.WriteDiagnostic(logDetail);

            tracker.Stop();
        }