KamiSama.Extensions.NLog 10.0.11.9

dotnet add package KamiSama.Extensions.NLog --version 10.0.11.9
                    
NuGet\Install-Package KamiSama.Extensions.NLog -Version 10.0.11.9
                    
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="KamiSama.Extensions.NLog" Version="10.0.11.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KamiSama.Extensions.NLog" Version="10.0.11.9" />
                    
Directory.Packages.props
<PackageReference Include="KamiSama.Extensions.NLog" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add KamiSama.Extensions.NLog --version 10.0.11.9
                    
#r "nuget: KamiSama.Extensions.NLog, 10.0.11.9"
                    
#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.
#:package KamiSama.Extensions.NLog@10.0.11.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=KamiSama.Extensions.NLog&version=10.0.11.9
                    
Install as a Cake Addin
#tool nuget:?package=KamiSama.Extensions.NLog&version=10.0.11.9
                    
Install as a Cake Tool

KamiSama.Extensions.NLog

Back to package index

Version: 10.0.0

Description

Provides three NLog layout renderers for Persian-calendar timestamps and an IFileCompressor implementation for creating password-protected ZIP archives through SharpZipLib. Use it with the surrounding package APIs when composing application code.

How to use

dotnet add package KamiSama.Extensions.NLog --version 10.0.0

Register the extension assembly in NLog.config, then select the renderer that matches the required timestamp shape:

<nlog>
  <extensions>
    <add assembly="KamiSama.Extensions.NLog" />
  </extensions>
  <targets>
    <target xsi:type="File" name="file" fileName="${baseDir}/app.log"
            layout="${persian-date:format=yyyy/MM/dd HH\:mm\:ss.fff} ${message}" />
  </targets>
</nlog>

The available renderer names are persian-date, persian-longDate, and persian-shortDate. To password-protect archives, assign the NLog file compressor in application startup:

using KamiSama.Extensions.NLog;
using NLog.Targets;

string archivePassword = Environment.GetEnvironmentVariable("NLOG_ARCHIVE_PASSWORD")
    ?? throw new InvalidOperationException("NLOG_ARCHIVE_PASSWORD is not configured.");

PasswordFunc passwordFunc = (fileName, archiveFileName) => archivePassword;
ConcurrentFileTarget.FileCompressor = new EncryptedZipArchiveFileCompressor(passwordFunc);

Resolve archive passwords from a secret store or protected configuration. Never hardcode them in source code or NLog.config.

Namespaces

Types

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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
10.0.11.9 88 8/24/2026
10.0.11.8 81 8/21/2026
10.0.11.7 101 8/21/2026
10.0.11.6 94 8/19/2026
10.0.11.5 77 8/18/2026
10.0.11.4 92 8/18/2026
10.0.11.3 90 8/18/2026
10.0.11.2 93 8/18/2026
10.0.11.1 94 8/15/2026
10.0.11 90 8/11/2026
10.0.10.2 104 8/4/2026
10.0.10.1 111 7/31/2026
10.0.10 111 7/30/2026
10.0.9 124 6/20/2026
10.0.7 122 5/1/2026
10.0.6 128 4/16/2026
10.0.1 263 11/26/2025
10.0.0 286 11/22/2025
3.1.6 266 11/7/2025
3.1.5 251 11/6/2025
Loading failed