Individual skill

orchardcore-logging-serilog

Skill for configuring Serilog logging in Orchard Core. Covers the OrchardCore.Logging.Serilog package reference in the web project, appsettings.json Serilog configuration with Console and File sinks, Program.cs initialization with UseSerilog or UseSerilogWeb, tenant-aware logging with UseSerilogTenantNameLogging and TenantName enrichment, output templates, per-environment configuration, and replacing the default NLog setup of the Orchard Core templates. Use this skill when requests mention Orchard Core Serilog Logging, Serilog Configuration in appsettings.json, Output Template Tokens, Minimum Level Overrides, tenant name in logs, or closely related Orchard Core setup or troubleshooting work. Strong matches include OrchardCore.Logging.Serilog, UseSerilogWeb, UseSerilogTenantNameLogging, FromLogContext, SourceContext, TenantName, ReadFrom.Configuration(), UseNLogHost.

src/CrestApps.AgentSkills/orchardcore/orchardcore-logging-serilog/SKILL.md

Read pinned source

Source commit d86d04f234b1b2bd8145368a2544490f9d557596

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
Yes
Observed behavior
Instructions only
Last checked
Nov 6, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
13
Repository last updated
Oct 21, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Orchard Core Serilog Logging - Prompt Templates

## Configure Serilog Structured Logging

You are an Orchard Core expert. Generate configuration and code for Serilog integration including structured logging, Console and File sinks, tenant-aware enrichment, and output template customization.

### Guidelines

- Add a `PackageReference` to `OrchardCore.Logging.Serilog` in the **web (startup) project**. It is a host-level library, not a module: there is no feature to enable and no recipe step.
- The Orchard Core templates use NLog (`builder.Host.UseNLogHost()`); remove that call (and the `OrchardCore.Logging.NLog` reference) when switching to Serilog.
- Configure Serilog in `appsettings.json` under the `Serilog` section.
- Initialize Serilog in `Program.cs` using `UseSerilog()` and `ReadFrom.Configuration()`.
- Always call `Enrich.FromLogContext()` to enable log context enrichment.
- Call `UseSerilogTenantNameLogging()` in the Orchard Core pipeline to add `TenantName` to the log context.