It’s often helpful to have more context around an exception when it occurs. Llama Logger allows you to include custom data (text) to your exceptions (Standard subscription or higher required).
You can add custom data globally and/or per-exception.
Each custom data value can be a maximum of 512 characters including spaces
Custom data added globally will be included with every exception. Typically, this includes environmental data such as server and other values that don't change.
LlamaLoggerClient client = new LlamaLoggerClient(apikey, version);
client.AddCustomData("Server", "Server001"); //This data will be included with every exception
Custom data added per-exception helps to provide context about the specific error. Typically, this includes session specific data such as the current user of your system.
LlamaLoggerClient client = new LlamaLoggerClient(apikey, version);
client.CustomizeLogEntry += Client_CustomizeLogEntry;
void Client_CustomizeLogEntry(object? sender, LlamaLogger.Core.CustomEventArgs.CustomizeLogEntryEventArgs e)
{
e.LogEntry.AddCustomData("UserName", "Admin"); //This data will be included with this exception only
e.LogEntry.AddCustomData("IP Address", "10.0.0.1"); //This data will be included with this exception only
}