AppCenter for Microsoft.Extensions.Logging

The AppCenter library can be used without any other Shiny module or wiring. It only requires the standing Microsoft.Logging.Extensions wiring with appbuilder.Logging.AddAppCenter("");


Registering in MAUI

  using Shiny;

  namespace ShinyApp;
  public static class MauiProgram
      public static MauiApp CreateMauiApp() 
        var builder = MauiApp
          .UseShiny() // <-- add this line (this is important)
          .ConfigureFonts(fonts =>
              fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
              fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");

      #if !MACCATALYST
      return builder.Build();


Within any component that has been registered with your dependency injection container, you can now do the following

using Microsoft.Logging.Extensions;

namespace MyNamespace;

public class MyThing {

    public MyThing(ILogger<MyThing> logger)
        logger.LogInformation("Hello World");