Пример #1
0
        LogifyClientExceptionReport CreateExceptionReport(Exception ex, IInfoCollector collector)
        {
            StringBuilder    content = new StringBuilder();
            StringWriter     writer  = new StringWriter(content);
            TextWriterLogger logger  = new TextWriterLogger(writer);

            logger.BeginWriteObject(String.Empty);
            try {
                collector.Process(ex, logger);
            }
            finally {
                logger.EndWriteObject(String.Empty);
            }

            LogifyClientExceptionReport report = new LogifyClientExceptionReport();

            report.ReportContent = content;
            report.Data          = logger.Data;
            return(report);
        }