원클릭으로
dck-serilog
Use when configuring AHKFlowApp Serilog, structured logging, sinks, enrichers, request logging, or Application Insights.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when configuring AHKFlowApp Serilog, structured logging, sinks, enrichers, request logging, or Application Insights.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when creating, removing, or troubleshooting AHKFlowApp git worktrees across Claude Code, Codex, or Copilot.
Use when optimizing AHKFlowApp agent workflow, worktrees, planning, verification loops, context budget, or tool usage.
Use when verifying AHKFlowApp build, tests, formatting, diagnostics, security, or readiness before commit, push, or PR.
Compact the current conversation into a handoff document for another agent to pick up.
Use to scan .NET code for performance anti-patterns across async, memory, strings, collections, LINQ, regex, and I/O.
Use to evaluate assertion depth and diversity across a test suite and flag assertion-free, shallow, or tautological tests.
| name | dck-serilog |
| description | Use when configuring AHKFlowApp Serilog, structured logging, sinks, enrichers, request logging, or Application Insights. |
AHKFlowApp already uses two-stage Serilog startup in src/Backend/AHKFlowApp.API/Program.cs, AddSerilog(...), UseSerilogRequestLogging(...), console/file sinks, and optional Application Insights when ApplicationInsights:ConnectionString is configured.
CreateBootstrapLogger() before building the host.{Property} placeholders over string interpolation.appsettings*.json or App Service configuration.Log.CloseAndFlushAsync().logger.LogInformation(
"Generated AutoHotkey script for profile {ProfileId} with {HotstringCount} hotstrings",
profileId,
hotstringCount);
For exceptions:
logger.LogError(ex, "Failed to generate script for profile {ProfileId}", profileId);
Use UseSerilogRequestLogging after exception middleware and before route execution where practical. Enrich with request metadata that is useful and safe:
app.UseSerilogRequestLogging(options =>
{
options.EnrichDiagnosticContext = (diagnosticContext, httpContext) =>
{
diagnosticContext.Set("RequestHost", httpContext.Request.Host.Value);
diagnosticContext.Set("UserAgent", httpContext.Request.Headers.UserAgent.ToString());
};
});
Application Insights is conditional in this repo. Keep the connection string empty for local development and inject it through Azure App Service configuration for TEST/PROD.
Do not upgrade Microsoft.ApplicationInsights.AspNetCore to 3.x unless the user explicitly asks; project guidance keeps it on 2.x.
Use LogContext.PushProperty(...) for scoped properties that should flow through multiple log events:
using (LogContext.PushProperty("OwnerOid", ownerOid))
{
logger.LogInformation("Importing hotstrings");
}
$"User {userId} did X" instead of "User {UserId} did X".| Scenario | Pattern |
|---|---|
| Startup errors | Bootstrap logger |
| Per-request summary | UseSerilogRequestLogging |
| Queryable event data | Message templates |
| TEST/PROD telemetry | App Service config + Application Insights sink |
| Repeated context | LogContext.PushProperty |
| Hot path logging | Consider [LoggerMessage] |