Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add structured logging to ImageBuilder

Open
#1,908 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp

Research direction

Start by locating the ImageBuilder entry point and reviewing its current Microsoft.Extensions.Logging usage. Then inspect how pipeline jobs publish artifacts and compare the proposed Serilog and NLog approaches. Done means concise console output, one structured JSON log per invocation, and one uploaded log artifact per pipeline job.

Written by the indexing model from the issue text.

Description

area-infrastructure

Adding structured logging to ImageBuilder would allow us to analyze log outputs and operate on log data using jq or other tools.

I propose that we split ImageBuilder's logging into two components:

  • High-level console logging that is concise (fits on ~one terminal screen) and easily parsable by humans and LLMs.
  • Detailed structured logging in json that is output to a file and published as a pipeline artifact. One log per ImageBuilder invocation. Put each log file into one folder and upload one log artifact per pipeline job.

Microsoft.Extensions.Logging does not have file logging support natively. See https://github.com/dotnet/runtime/issues/59322. There are a couple libraries that can provide this functionality through M.E.Logging.Abstractions (using ILogger) - both are popular and in active development:

NLog version 6 fully supports Native AOT/trimming so I lean towards that one.

Dominant language
C#
Stars
182
Forks
67
Avg merge
1d 20h
Merged PRs (30d)
15

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/docker-tools

All issues in dotnet/docker-tools

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.