An open API service indexing awesome lists of open source software.

https://github.com/nlog/nlog.performancecounter

NLog extensions for displaying and updating Windows Performance Counters
https://github.com/nlog/nlog.performancecounter

csharp dotnet nlog nlog-target performancecounter

Last synced: about 2 months ago
JSON representation

NLog extensions for displaying and updating Windows Performance Counters

Awesome Lists containing this project

README

          

# NLog.PerformanceCounter
NLog extensions to [Display Windows Performance Counters](https://github.com/NLog/NLog/wiki/PerformanceCounter-Layout-Renderer) and [Update Windows Performance Counters](https://github.com/NLog/NLog/wiki/PerfCounter-target)

[![Version](https://badge.fury.io/nu/NLog.PerformanceCounter.svg)](https://www.nuget.org/packages/NLog.PerformanceCounter)
[![AppVeyor](https://img.shields.io/appveyor/ci/nlog/NLog-PerformanceCounter/master.svg)](https://ci.appveyor.com/project/nlog/NLog-PerformanceCounter/branch/master)

### How to install

1) Install the package

`Install-Package NLog.PerformanceCounter` or in your csproj:

```xml

```

2) Add to your nlog.config:

```xml



```

Alternative register from code using [fluent configuration API](https://github.com/NLog/NLog/wiki/Fluent-Configuration-API):

```csharp
LogManager.Setup().SetupExtensions(ext => {
ext.RegisterTarget();
ext.RegisterLayoutRenderer();
});
```

### Example of displaying PerformanceCounter
Example of `NLog.config`-file that displays Windows Performance Counter value:

```xml









```

### Example of updating PerformanceCounter
Example of `NLog.config`-file that updates Windows Performance Counter value:

```xml









```