Serilog.Enrichers.Autodesk.Revit 2.0.1

dotnet add package Serilog.Enrichers.Autodesk.Revit --version 2.0.1                
NuGet\Install-Package Serilog.Enrichers.Autodesk.Revit -Version 2.0.1                
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.Autodesk.Revit" Version="2.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Enrichers.Autodesk.Revit --version 2.0.1                
#r "nuget: Serilog.Enrichers.Autodesk.Revit, 2.0.1"                
#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.Autodesk.Revit as a Cake Addin
#addin nuget:?package=Serilog.Enrichers.Autodesk.Revit&version=2.0.1

// Install Serilog.Enrichers.Autodesk.Revit as a Cake Tool
#tool nuget:?package=Serilog.Enrichers.Autodesk.Revit&version=2.0.1                

Serilog.Enrichers.Autodesk.Revit

JetBrains Rider License MIT Revit 2017-2025 main

The Autodesk Revit enrichers for Serilog.

Getting started

Install the Serilog.Enrichers.Autodesk.Revit package from NuGet:

Install-Package Serilog.Enrichers.Autodesk.Revit

Then, apply the enricher to you LoggerConfiguration:

// IExternalCommand.Execute
public Result Execute(ExternalCommandData commandData, 
                      out string message, 
                      ElementSet elements) {
    UIApplication uiApplication = commandData.Application;
    var log = new LoggerConfiguration()
        .Enrich.WithRevitVersion(uiApplication)
        // other enrichers..
        .CreateLogger();
}
// IExternalApplication.Execute
public Result OnStartup(UIControlledApplication application) {
    var log = new LoggerConfiguration()
        .Enrich.WithRevitVersion(application)
        // other enrichers...
        .CreateLogger();
}
Included enrichers

The package includes:

  • WithRevitVersion() - adds Application.VersionNumber or ControlledApplication.VersionNumber
  • WithRevitBuild() - adds Application.VersionBuild or ControlledApplication.VersionBuild
  • WithRevitUserName() - adds Application.Username or ControlledApplication.Username
  • WithRevitLanguage() - adds Application.Language or ControlledApplication.Language
  • WithRevitDocumentTitle() - adds Document.Title
  • WithRevitDocumentPathName() - adds Document.PathName
  • WithRevitDocumentModelPath() - adds Document.GetCloudModelPath() if Document.IsModelInCloud is true or Document.GetWorksharingCentralModelPath() if Document.IsWorkshared is true
  • WithRevitAddinId() - adds Application.ActiveAddinId
Product Compatible and additional computed target framework versions.
.NET 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 Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.1 199 5/21/2024
2.0.0 124 5/14/2024
1.0.0 187 6/5/2023