KissLog (.NET)

.NET applications can use the KissLog NuGet package to save the logs to Logbee.

Different use cases and examples can be found on the KissLog integrations page.

KissLog KissLog.AspNetCore KissLog.AspNet.Mvc KissLog.AspNet.WebApi
Program.cs
using KissLog.AspNetCore;
using KissLog.CloudListeners.Auth;
using KissLog.CloudListeners.RequestLogsListener;
using KissLog.Formatters;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddLogging(provider =>
{
    provider
        .AddKissLog(options =>
        {
            options.Formatter = (FormatterArgs args) =>
            {
                if (args.Exception == null)
                    return args.DefaultValue;

                string exceptionStr = new ExceptionFormatter().Format(args.Exception, args.Logger);
                return string.Join(Environment.NewLine, new[] { args.DefaultValue, exceptionStr });
            };
        });
});

var app = builder.Build();

app.MapGet("/", (ILogger<Program> logger) =>
{
    logger.LogInformation("Hello from minimal API");
    return "Hello World!";
});

app.MapControllerRoute(
    name: "default",
    pattern: "{controller=Home}/{action=Index}/{id?}");

app.UseKissLogMiddleware(options => {
    options.Listeners.Add(new RequestLogsApiListener(new Application("_OrganizationId_", "_ApplicationId_"))
    {
        ApiUrl = "https://api.logbee.net/"
    });
});

app.Run();

For technical support, questions or any feedback, please feel free to send us a message and we will get back to you.