ThisCloud.Framework.Loggings.Admin 1.0.94

dotnet add package ThisCloud.Framework.Loggings.Admin --version 1.0.94
                    
NuGet\Install-Package ThisCloud.Framework.Loggings.Admin -Version 1.0.94
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ThisCloud.Framework.Loggings.Admin" Version="1.0.94" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ThisCloud.Framework.Loggings.Admin" Version="1.0.94" />
                    
Directory.Packages.props
<PackageReference Include="ThisCloud.Framework.Loggings.Admin" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ThisCloud.Framework.Loggings.Admin --version 1.0.94
                    
#r "nuget: ThisCloud.Framework.Loggings.Admin, 1.0.94"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ThisCloud.Framework.Loggings.Admin@1.0.94
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ThisCloud.Framework.Loggings.Admin&version=1.0.94
                    
Install as a Cake Addin
#tool nuget:?package=ThisCloud.Framework.Loggings.Admin&version=1.0.94
                    
Install as a Cake Tool

ThisCloud.Framework.Loggings.Admin

Español | English

Español

Endpoints de administración runtime para logging (enable/disable, GET/PUT/PATCH settings). ⚠️ NO exponer en Production sin protección.

Instalación

dotnet add package ThisCloud.Framework.Loggings.Admin

Inicio Rápido

using ThisCloud.Framework.Loggings.Serilog;
using ThisCloud.Framework.Loggings.Admin;

var builder = WebApplication.CreateBuilder(args);

builder.Host.UseThisCloudFrameworkSerilog(builder.Configuration, "mi-api");
builder.Services.AddThisCloudFrameworkLoggings(builder.Configuration, "mi-api");

builder.Services.AddAuthorization(options =>
{
    options.AddPolicy("Admin", policy => policy.RequireRole("Admin"));
});

var app = builder.Build();
app.UseAuthorization();

app.MapThisCloudFrameworkLoggingsAdmin(app.Configuration);

app.Run();

appsettings.Development.json

{
  "ThisCloud": {
    "Loggings": {
      "Admin": {
        "Enabled": true,
        "AllowedEnvironments": ["Development"],
        "RequireAdmin": false
      }
    }
  }
}

appsettings.Production.json

{
  "ThisCloud": {
    "Loggings": {
      "Admin": {
        "Enabled": false
      }
    }
  }
}

Endpoints

  • GET /api/admin/logging/settings: Obtener configuración
  • PUT /api/admin/logging/settings: Reemplazar configuración
  • PATCH /api/admin/logging/settings: Merge parcial
  • POST /api/admin/logging/enable: Activar logging
  • POST /api/admin/logging/disable: Desactivar logging
  • DELETE /api/admin/logging/settings: Reset a defaults

⚠️ Seguridad

  • ✅ Endpoints deshabilitados por defecto (Enabled=false)
  • ✅ Gating por entorno (AllowedEnvironments)
  • ✅ Policy obligatoria (RequireAdmin=true → policy "Admin")
  • NO exponer públicamente sin autenticación

Documentación Completa

Licencia

ISC License - Sin garantías, sin responsabilidad por brechas de seguridad si se expone sin protección.
Ver LICENSE completo.


English

Runtime admin endpoints for logging (enable/disable, GET/PUT/PATCH settings). ⚠️ DO NOT expose in Production without protection.

Install

dotnet add package ThisCloud.Framework.Loggings.Admin

Quick Start

using ThisCloud.Framework.Loggings.Serilog;
using ThisCloud.Framework.Loggings.Admin;

var builder = WebApplication.CreateBuilder(args);

builder.Host.UseThisCloudFrameworkSerilog(builder.Configuration, "my-api");
builder.Services.AddThisCloudFrameworkLoggings(builder.Configuration, "my-api");

builder.Services.AddAuthorization(options =>
{
    options.AddPolicy("Admin", policy => policy.RequireRole("Admin"));
});

var app = builder.Build();
app.UseAuthorization();

app.MapThisCloudFrameworkLoggingsAdmin(app.Configuration);

app.Run();

appsettings.Development.json

{
  "ThisCloud": {
    "Loggings": {
      "Admin": {
        "Enabled": true,
        "AllowedEnvironments": ["Development"],
        "RequireAdmin": false
      }
    }
  }
}

appsettings.Production.json

{
  "ThisCloud": {
    "Loggings": {
      "Admin": {
        "Enabled": false
      }
    }
  }
}

Endpoints

  • GET /api/admin/logging/settings: Get configuration
  • PUT /api/admin/logging/settings: Replace configuration
  • PATCH /api/admin/logging/settings: Partial merge
  • POST /api/admin/logging/enable: Enable logging
  • POST /api/admin/logging/disable: Disable logging
  • DELETE /api/admin/logging/settings: Reset to defaults

⚠️ Security

  • ✅ Endpoints disabled by default (Enabled=false)
  • ✅ Environment gating (AllowedEnvironments)
  • ✅ Mandatory policy (RequireAdmin=true → policy "Admin")
  • DO NOT expose publicly without authentication

Full Documentation

License

ISC License - No warranties, no liability for security breaches if exposed without protection.
See full LICENSE.


Copyright © 2025 Marco Alejandro De Santis

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.94 122 2/21/2026
1.0.92 110 2/14/2026
1.0.91 107 2/14/2026
1.0.86 104 2/14/2026