Skip to content

krzysiek-b/serilog-enrichers-memory

 
 

Repository files navigation

Serilog.Enrichers.Memory

The memory usage enricher for Serilog.

Build status NuGet Version

Documentation

To use the enricher, first install the NuGet package:

Install-Package Serilog.Enrichers.Memory

Then enrich your logging configuration:

new LoggerConfiguration()
    .Enrich.WithMemoryUsage();

And finally utilise the token in your logging template:

var template = "{MemoryUsage}";

You can also enrich your logging configuration for virtual memory:

new LoggerConfiguration()
    .Enrich.WithVirtualMemoryUsage();

And finally utilise the token in your logging template:

var template = "{VirtualMemoryUsage}";

Please notice VirtualMemoryUsage is not available for .NET Standard 1.3 due to Process API unavailability.

Copyright © 2017 Josh Schreuder - Provided under the Apache License, Version 2.0.

About

An enricher for Serilog which outputs memory usage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 76.6%
  • PowerShell 23.4%