Serilog.Enrichers.Environment 3.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Serilog.Enrichers.Environment --version 3.0.0                
NuGet\Install-Package Serilog.Enrichers.Environment -Version 3.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Serilog.Enrichers.Environment" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Enrichers.Environment --version 3.0.0                
#r "nuget: Serilog.Enrichers.Environment, 3.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Serilog.Enrichers.Environment as a Cake Addin
#addin nuget:?package=Serilog.Enrichers.Environment&version=3.0.0

// Install Serilog.Enrichers.Environment as a Cake Tool
#tool nuget:?package=Serilog.Enrichers.Environment&version=3.0.0                


Enriches Serilog events with information from the execution environment.

Build status NuGet Version

To use the enricher, first install the NuGet package:

dotnet add package Serilog.Enrichers.Environment

Then, apply the enricher to you LoggerConfiguration:

Log.Logger = new LoggerConfiguration()
    // ...other configuration...

The WithMachineName() enricher will add a MachineName property to produced events.

Included enrichers

The package includes:

  • WithMachineName() - adds MachineName based on either %COMPUTERNAME% (Windows) or $HOSTNAME (macOS, Linux)
  • WithEnvironmentUserName() - adds EnvironmentUserName based on USERNAME and USERDOMAIN (if available)
  • WithEnvironmentName() - adds EnvironmentName based on ASPNETCORE_ENVIRONMENT or DOTNET_ENVIRONMENT (when both are available then 'ASPNETCORE_ENVIRONMENT' takes precedence, when none are available then the fallback value will be 'Production')
  • WithEnvironmentVariable(string envVarName, string propertyName = null) - adds an <envVarName> property to the log event with the value for the specified environment variable. Optional <propertyName> will override <envVarName> as propertyName.

Copyright © 2016 Serilog Contributors - Provided under the Apache License, Version 2.0.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 is compatible.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (392)

Showing the top 5 NuGet packages that depend on Serilog.Enrichers.Environment:

Package Downloads

The IPP .NET SDK for QuickBooks V3 is a set of .NET classes that make it easier to call QuickBooks APIs. This is the .Net Standard 2.0 version of the .Net SDK


Sitko.Core is a set of libraries to help build .NET Core applications fast


Iris common data types package


Modern and flexible load testing framework for Pull and Push scenarios, designed to test any system regardless a protocol (HTTP/WebSockets/AMQP etc) or a semantic model (Pull/Push).


Provides capability to improve telemetry with Serilog in applications

GitHub repositories (49)

Showing the top 5 popular GitHub repositories that depend on Serilog.Enrichers.Environment:

Repository Stars
Production Grade Cloud-Ready .NET 8 Starter Kit (Web API + Blazor Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
The administration for the IdentityServer4 and Asp.Net Core Identity
Clean Architecture Template for Blazor WebAssembly Built with MudBlazor Components.
.NET project templates with batteries included, providing the minimum amount of code required to get you going faster.
Microservices on .Net platforms which used ASP.NET Web API, Docker, RabbitMQ, MassTransit, Grpc, Yarp API Gateway, PostgreSQL, Redis, SQLite, SqlServer, Marten, Entity Framework Core, CQRS, MediatR, DDD, Vertical and Clean Architecture implementation with using latest features of .NET 8 and C# 12
Version Downloads Last updated
3.0.1 384,493 6/20/2024
3.0.1-dev-00816 92 6/20/2024
3.0.0 247,420 6/9/2024
3.0.0-dev-00811 98 6/9/2024
3.0.0-dev-00806 143,266 11/14/2023
3.0.0-dev-00804 17,139 10/26/2023
3.0.0-dev-00802 1,074 10/26/2023
2.3.1-dev-00801 6,511 10/16/2023
2.3.0 11,114,932 10/3/2023
2.3.0-dev-00793 72,879 6/4/2023
2.3.0-dev-00792 99,456 2/3/2023
2.3.0-dev-00791 18,986 1/4/2023
2.2.1-dev-00787 677,899 8/15/2021
2.2.0 55,012,039 8/15/2021
2.2.0-dev-00784 74,632 4/5/2021
2.2.0-dev-00780 23,162 2/10/2021
2.2.0-dev-00777 17,073 2/4/2021
2.2.0-dev-00773 190,760 12/15/2020
2.2.0-dev-00770 1,995 12/12/2020
2.2.0-dev-00761 246,775 8/2/2020
2.1.3 49,970,483 3/8/2019
2.1.3-dev-00759 1,448 6/29/2020
2.1.3-dev-00752 119,193 9/22/2018
2.1.3-dev-00748 39,462 6/3/2018
2.1.3-dev-00746 39,717 5/9/2018
2.1.3-dev-00736 86,924 8/16/2017
2.1.2 9,982,055 3/21/2017
2.1.2-dev-00731 6,626 2/21/2017
2.1.1 401,686 11/22/2016
2.1.1-dev-00727 1,855 11/22/2016
2.1.1-dev-00724 2,710 8/11/2016
2.1.0 402,205 7/26/2016
2.1.0-dev-00719 2,144 7/26/2016
2.0.1 100,486 7/18/2016
2.0.0 226,269 6/29/2016
2.0.0-rc-710 2,606 5/26/2016
2.0.0-rc-708 2,297 5/17/2016
2.0.0-beta-701 2,363 4/11/2016
2.0.0-beta-700 1,863 3/23/2016
2.0.0-beta-521 1,839 3/18/2016
2.0.0-beta-519 1,957 3/16/2016
2.0.0-beta-516 1,821 3/15/2016
2.0.0-beta-515 1,838 3/15/2016
2.0.0-beta-513 1,831 3/15/2016
2.0.0-beta-511 1,815 3/14/2016
2.0.0-beta-509 1,811 3/13/2016
2.0.0-beta-507 2,381 3/1/2016
2.0.0-beta-505 1,963 2/25/2016
2.0.0-beta-502 1,946 2/22/2016
2.0.0-beta-499 1,862 2/21/2016