Serilog.Sinks.LlamaLogger 24.1.3.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Serilog.Sinks.LlamaLogger --version 24.1.3.3                
NuGet\Install-Package Serilog.Sinks.LlamaLogger -Version 24.1.3.3                
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="Serilog.Sinks.LlamaLogger" Version="24.1.3.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Sinks.LlamaLogger --version 24.1.3.3                
#r "nuget: Serilog.Sinks.LlamaLogger, 24.1.3.3"                
#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.
// Install Serilog.Sinks.LlamaLogger as a Cake Addin
#addin nuget:?package=Serilog.Sinks.LlamaLogger&version=24.1.3.3

// Install Serilog.Sinks.LlamaLogger as a Cake Tool
#tool nuget:?package=Serilog.Sinks.LlamaLogger&version=24.1.3.3                

Welcome to Llama Logger

Using only a few lines of code, you can start tracking and managing your exceptions online. All of your exceptions will be accessible in one place with the option to receive email notifications when new exceptions arrive.

Go to www.llamalogger.com to get started.

Getting Started

  1. Create your account at www.llamalogger.com
  2. Log in and create a new project
  3. Copy your project's API key
  4. Add the Serilog.Sinks.LlamaLogger NuGet package to your solution
  5. Call the WriteTo.LlamaLogger("yourapikey") method and you're ready to go

Note: Only Warning, Error, and Fatal exceptions are logged to Llama Logger

using  Serilog.Sinks.LlamaLogger;  

string apikey =  "<project API key>";  //Your project API key from your Llama Logger account  

var logger = new LoggerConfiguration().WriteTo.LlamaLogger("yourapikey").CreateLogger();

try  
{  
	throw  new  InvalidOperationException("Oops!");  
}  
catch(Exception ex)  
{ 
	logger.Error(ex);
}

Customize Log Entries

You can customize log entries before they are sent to the server by adding custom data and attachments.

Global Customization

var logger = new LoggerConfiguration().WriteTo.LlamaLogger("yourapikey", (llamalogger) => {
    llamalogger.AddCustomData("Server", "Server001");  //This data will be included with every exception
}).CreateLogger();

Exception Specific Customization

var logger = new LoggerConfiguration().WriteTo.LlamaLogger("yourapikey", (llamalogger) => {
    llamalogger.CustomizeLogEntry += (sender, e) =>
    {
        e.LogEntry.AddCustomData("UserName", "Administrator");
        e.LogEntry.AddCustomData("IP Address", "99.88.77.66");

        byte[] screenshot = GetScreenshotData(); //Get an array of data
        e.LogEntry.AddAttachment("Screenshot.png", screenshot);
    };
}).CreateLogger();
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 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
24.1.4.1 72 7/22/2024
24.1.3.3 58 7/10/2024