npx skills add codewithmukesh/dotnet-claude-kit --skill serilog
stuartf303/vandaemon · Archived
serilog
Implements structured logging and configures Serilog sinks for VanDaemon. Use when: Adding logging to services, configuring log sinks, debugging with structured data, setting up log enrichment.
Installation
npx skills add stuartf303/vandaemon --skill serilog
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Creates Material Design UI components and touch-optimized interfaces for Blazor WebAssembly. Us…
93 installsDesigns PCB schematics and circuit layouts for hardware projects. Use when: Creating or modifyi…
7 installsApplies UI design with Material Design components and SVG diagrams for the VanDaemon Blazor Web…
3 installsWrites fluent, readable test assertions and validations using FluentAssertions library. Use whe…
3 installsSimilar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Also in this package
Other skills from stuartf303/vandaemon · top by installs.
npx skills add stuartf303/vandaemon
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Skill metadata
Parsed from SKILL.md frontmatter.
Read, Edit, Write, Glob, Grep, BashPackage contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md2,926 B -
docs
SUMMARY.md208 B
History
- First seen on skills.sh
- First recorded snapshot · 1 installs
SKILL.md
Serilog Skill
VanDaemon uses Serilog 8.x for structured logging with console and file sinks. Logs use semantic message templates with named properties for queryability. The API layer configures Serilog in Program.cs with rolling file output to logs/vandaemon-{Date}.txt.
Quick Start
Basic Structured Logging
// Inject ILogger<T> via constructor
private readonly ILogger<TankService> _logger;
public TankService(ILogger<TankService> logger)
{
_logger = logger;
}
// Use semantic message templates - property names in braces
_logger.LogInformation("Tank {TankId} updated to {Level}%", tankId, level);
_logger.LogWarning("Tank {TankName} below threshold: {CurrentLevel}% < {Threshold}%",
tank.Name, tank.CurrentLevel, tank.AlertLevel);
Exception Logging
try
{
await plugin.SetStateAsync(controlId, state, ct);
}
catch (Exception ex)
{
// Exception as FIRST parameter, then message template
_logger.LogError(ex, "Failed to set state for control {ControlId}", controlId);
throw;
}
Key Concepts
| Concept | Usage | Example |
|---|---|---|
| Message Template | Named placeholders for structured data | "Processing {TankId}" |
| Log Level | Severity filtering | LogInformation, LogWarning, LogError |
| Enrichment | Automatic context properties | Enrich.FromLogContext() |
| Sink | Output destination | Console, File, Seq |
Common Patterns
Service Layer Logging
When: Logging business operations with context
public async Task<Tank> UpdateTankAsync(Tank tank, CancellationToken ct)
{
_logger.LogDebug("Updating tank {TankId}: {TankName}", tank.Id, tank.Name);
// Business logic...
_logger.LogInformation("Tank {TankId} saved successfully", tank.Id);
return tank;
}
Plugin Lifecycle Logging
When: Tracking plugin initialization and disposal
public async Task InitializeAsync(Dictionary<string, object> config, CancellationToken ct)
{
_logger.LogInformation("Initializing {PluginName} v{Version}", Name, Version);
if (!config.TryGetValue("MqttBroker", out var broker))
{
_logger.LogWarning("{PluginName} missing MqttBroker config, using default", Name);
}
}
See Also
- [patterns](references/patterns.md) - Structured logging patterns and enrichment
- [workflows](references/workflows.md) - Configuration and debugging workflows
Related Skills
- See the aspnet-core skill for middleware logging configuration
- See the dotnet skill for DI registration patterns
- See the docker skill for viewing container logs