Aquila.SmartLogger 1.0.6

dotnet add package Aquila.SmartLogger --version 1.0.6
                    
NuGet\Install-Package Aquila.SmartLogger -Version 1.0.6
                    
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="Aquila.SmartLogger" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aquila.SmartLogger" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Aquila.SmartLogger" />
                    
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 Aquila.SmartLogger --version 1.0.6
                    
#r "nuget: Aquila.SmartLogger, 1.0.6"
                    
#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 Aquila.SmartLogger@1.0.6
                    
#: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=Aquila.SmartLogger&version=1.0.6
                    
Install as a Cake Addin
#tool nuget:?package=Aquila.SmartLogger&version=1.0.6
                    
Install as a Cake Tool

📘 Aquila.SmartLogger

Aquila.SmartLogger is a lightweight, zero-configuration logging library for .NET designed to eliminate repetitive try/catch blocks while providing rich, structured, and consistent logs automatically.

It focuses on developer experience, clean code, and real-world production needs.

Write business logic.
Aquila handles logging, errors, context, and even live streaming to your dashboard.


Why Aquila.SmartLogger?

Most applications suffer from:

  • Repeated try/catch blocks
  • Inconsistent logging styles
  • Missing runtime context
  • Logs that are hard to trace and debug

Aquila.SmartLogger solves this by introducing Safe execution wrappers, automatic context capture, and optional live logging.


Key Features

  • Zero-config setup

  • Console and File logging support

  • Structured JSON logs

  • Automatic context capture:

    • Method name
    • Source file
    • Line number
    • Machine name
    • OS details
  • Multiple log levels:

    • Debug
    • Info
    • Success
    • Warn
    • Error
    • Fatal
  • Clean Safe() execution wrappers

  • Generic Safe<T>() support

  • Extensible logging targets

  • Lightweight and fast

  • Optional live logging to dashboard

  • No external dependencies


Installation

Install via NuGet:

dotnet add package Aquila.SmartLogger

Or Package Manager:

Install-Package Aquila.SmartLogger

Initialization & Setup

Local / Offline Logging

This mode logs events only to your local logs folder. No live dashboard is used.

AquilaLogger.Init(
    logDirectory: "logs",
    apiKey: "AQUILA_SECRET_2026",
    liveOn: false
);
  • ✅ Logs are stored in local files
  • ✅ No internet connection required
  • ✅ Ideal for testing or offline applications

All logs will be written in logs/<appname>.log as plain text.


Live Logging (Dashboard)

Enable live logs in your dashboard using your unique API key. Sign up at: SmartLogger Signup

AquilaLogger.Init(
    logDirectory: "logs",
    apiKey: "AQUILA_SECRET_2026_XXXXXX",
    liveOn: true
);
  • All logs will be pushed live to your dashboard
  • Monitor apps remotely in real-time
  • Requires a valid API key obtained from signup

Basic Logging

AquilaLogger.Debug("Debug message");
AquilaLogger.Info("Application started");
AquilaLogger.Success("Operation completed successfully");
AquilaLogger.Warn("Potential issue detected");
AquilaLogger.Error(new Exception("Something went wrong"));
AquilaLogger.Fatal("Critical failure");

Safe Execution (Core Feature)

Traditional Approach (Messy)

try
{
    DoSomething();
}
catch (Exception ex)
{
    logger.LogError(ex, "Something failed");
}

Aquila Approach (Clean)

AquilaLogger.Safe(() =>
{
    DoSomething();
}, "Something failed");

Benefits:

  • One-line error handling
  • Guaranteed logging
  • Automatic context capture
  • Consistent format across the project

Safe Execution with Return Value

int result = AquilaLogger.Safe(() =>
{
    return 10 / 2;
}, "Division failed");

If an exception occurs, the error is logged and default(T) is returned safely.


Complete Real-World Example

using System;
using Aquila.SmartLogger.Core;

class Program
{
    static void Main()
    {
        // Local mode
        AquilaLogger.Init(
            logDirectory: "logs",
            apiKey: "AQUILA_SECRET_2026",
            liveOn: false
        );

        // OR Live mode
        // AquilaLogger.Init(
        //     logDirectory: "logs",
        //     apiKey: "AQUILA_SECRET_2026_XXXXXX",
        //     liveOn: true
        // );

        AquilaLogger.MinimumLevel = LogLevel.Debug;

        AquilaLogger.Info("Application started");

        AquilaLogger.Safe(() =>
        {
            int result = 10 / 2;
            AquilaLogger.Success($"Division successful: {result}");
        }, "Division failed");

        AquilaLogger.Safe(() =>
        {
            int result = 10 / 0; // throws
            AquilaLogger.Success($"Result: {result}");
        }, "Division failed");

        Console.WriteLine("Logger demo finished");
    }
}

Log Output Format (JSON)

{
  "AppName": "DemoApp",
  "Level": "Error",
  "Message": "Division failed",
  "Exception": "System.DivideByZeroException...",
  "Method": "Safe",
  "File": "Program.cs",
  "Line": 24,
  "Machine": "AQUILAINNOVATIO",
  "OS": "Microsoft Windows NT",
  "Timestamp": "2026-01-26T05:49:44Z"
}

Log Levels

Level Usage
Debug Development diagnostics
Info Application flow
Success Business success events
Warn Potential issues
Error Handled exceptions
Fatal Critical failures

Set minimum log level:

AquilaLogger.MinimumLevel = LogLevel.Warn;

Extending the Logger

You can add new logging targets by implementing:

public interface ILogTarget
{
    void Write(LogEntry entry);
}

Examples:

  • Database logging
  • API logging
  • Cloud logging
  • Notification systems

Best Use Cases

  • APIs and microservices
  • Background workers
  • Desktop applications
  • CLI tools
  • Enterprise applications
  • Logging standardization across teams

License

MIT License © 2026 Aquila Innovations


Final Note

Aquila.SmartLogger is designed to reduce boilerplate, enforce consistency, and improve observability without slowing developers down.

Clean code in. Clear insight out.


“Write business logic. Aquila handles logging, context, errors, and live monitoring.”


---

✅ **What’s new in this update:**

1. Added **live logging (`liveOn: true`)** section.  
2. Clarified **local/offline logging (`liveOn: false`)**.  
3. Included **signup link** for users to get their API key.  
4. Maintained all existing examples, safe execution, and JSON logs.  
5. Clear distinction between **offline vs live mode**.

---

 
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.6 156 1/28/2026
1.0.5 130 1/28/2026
1.0.4 129 1/27/2026
1.0.3 123 1/26/2026
1.0.2 127 1/26/2026
1.0.1 124 1/26/2026
1.0.0 126 1/26/2026