-
Notifications
You must be signed in to change notification settings - Fork 32
Report Templates
Peter van der Woude edited this page Sep 23, 2018
·
9 revisions
Reports can be generated in 3 different formats:
The format can be chosen via the configuration property ReportTemplateFormat
eg
var er = new ExceptionReporter() { Config = { ReportTemplateFormat = TemplateFormat.Text }}
Custom templates can also be written using Handlebars templating engine. To write a custom template you will need to know the variables available. The available variables are contained in the class ReportModel
The template for plain text (used internally) also serves as an example.
Application: {{App.Name}}
Version: {{App.Version}}
Region: {{App.Region}}
{{#if App.User}}
User: {{App.User}}
{{/if}}
Date: {{Error.Date}}
Time: {{Error.Time}}
{{#if Error.Explanation}}
User Explanation: {{Error.Explanation}}
{{/if}}
Error Message: {{Error.Message}}
[Stack Traces]
{{Error.FullStackTrace}}
[Assembly References]
{{#App.AssemblyRefs}}
{{Name}}, Version={{Version}}
{{/App.AssemblyRefs}}
[System Info]
{{SystemInfo}}