โ† All ASP.NET Core Flashcard Decks

Configuration & Logging Flashcards

6 cards from real ASP.NET Core practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Configuration & Logging flashcards as text
  1. Which interface is used to write log messages in ASP.NET Core applications?

    Answer: ILogger

    ILogger is the generic logging interface injected via DI, scoping logs to the category name derived from T.

  2. What is the lowest severity log level in ASP.NET Core logging?

    Answer: Trace

    Trace is the most verbose level, intended for detailed diagnostic messages, typically disabled in production.

  3. Which method logs a message at the Error level using ILogger?

    Answer: logger.LogError(message)

    ILogger provides convenience methods like LogError(), LogWarning(), and LogInformation() for each log level.

  4. What does the Logging:LogLevel:Default configuration key control?

    Answer: The minimum log level for all categories that don't have a specific override

    Logging:LogLevel:Default sets the baseline minimum severity; categories with specific entries override this default.

  5. Which NuGet package provides structured logging with Serilog in ASP.NET Core?

    Answer: Serilog.AspNetCore

    Serilog.AspNetCore integrates Serilog as the logging provider, replacing the default Microsoft logging pipeline.

  6. What is structured logging in the context of ASP.NET Core?

    Answer: Logging with named placeholders that capture values as structured data, not just strings

    Structured logging captures log message parameters as individual fields (e.g., UserId=42) enabling powerful filtering and querying.

Configuration & Logging Flashcards โ€” ASP.NET Core Study Cards with Answers