Skip to content

Commit

Permalink
documentation (still in WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaritossa committed Apr 23, 2023
1 parent eb1f383 commit eb52347
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 6 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,21 @@ It can be used with version 5.1.1 and later of NLog

`Install-Package NLog.Target.Bugsnag`

2) Use the target type `"Bugsnag, NLog.Targets.Bugsnag"` in your nlog.config including apiKey and releaseStage
2) Use the target type `"Bugsnag, NLog.Targets.Bugsnag"` in your nlog.config including apiKey and releaseStage (see [Configuration](/docs/configuration.md) page for all parameters). Best with [AsyncWrappers](https://github.com/NLog/NLog/wiki/AsyncWrapper-target)

```xml
<target name="bugsnag" xsi:type="Bugsnag, NLog.Targets.Bugsnag"
apikey="your-busgnag-api-key-goes-here"
releaseStage="development|production"
</target>
<target name="bugsnagAsync" xsi:type="AsyncWrapper">
<target xsi:type="Bugsnag, NLog.Targets.Bugsnag"
name="bugsnag"
apikey="your-busgnag-api-key-goes-here"
releaseStage="development|production"
</target>
</target>
<rules>
<logger minLevel="Error" writeTo="bugsnagAsync" />
</rules>
```

### Support

NLog Bugsnag is open source software maintained by voluntary contributors in their spare time and on a best effort basis.
Expand Down
56 changes: 56 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Configuration Syntax
```xml
<targets>
<target name="bugsnagAsync" xsi:type="AsyncWrapper">
<target xsi:type="Bugsnag, NLog.Targets.Bugsnag"
name="String"
apikey="String"
releaseStage="String"
context="Layout"
errorClass="Layout">
<app appType="Layout"
version="Layout">
<assembly name="String" /><!-- repeated -->
</app>
<request include="Boolean">
<clientIp include="Boolean" layout="Layout" />
<headers include="Boolean" layout="Layout" />
<httpMethod include="Boolean" />
<referer include="Boolean" />
<url include="Boolean" />
</request>
</target>
</target>
</targets>
```
## Target Parameters
* _name_ - Name of the target. [String]
* _apiKey_ - [Required] The "Notifier API key" generated by Bugsnag when creating the project.
* _releaseStage_ - [Required]
* _context_ - [Optional]
* _errorClass_ - [Optional]

## App Parameters
* _appType_ - [Optional]
* _version_ - [Optional]
* _assembly_ - [Optional] A collection of assemblies name to include with their version.
* _name_ -

## Request Parameters
* _include_ -
* _clientIp_ -
* _include_ -
* _layout_ -
* _headers_ -
* _include_ -
* _layout_ -
* _httpMethod_ -
* _include_ -
* _layout_ -
* _referer_ -
* _include_ -
* _layout_ -
* _url_ -
* _include_ -
* _layout_ -

0 comments on commit eb52347

Please sign in to comment.