From e0994dc904a686decde743de6eb7b5523e0f8695 Mon Sep 17 00:00:00 2001 From: David Noakes Date: Wed, 24 Jul 2024 08:35:49 +0200 Subject: [PATCH] Update README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 7c98b60..2e27082 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,19 @@ Log.Logger = new LoggerConfiguration() .CreateLogger(); ``` +To get tags to populate on the exceptionless UI, add a `Tags` string enumerable to any log. + +```Example with Serilog: +Serilog: Log.ForContext("Tags", new List() { "Tag1", "Tag2"}).Information("Seri info"); +``` + +```Example with ILogger +using (var scope = _logger.BeginScope(new Dictionary { ["Tags"] = new string[] { "Tag1", "Tag2" }})) +{ +_logger.Log(logLevel, eventId, state, exception, formatter); +} +``` + * [Documentation](https://github.com/serilog/serilog/wiki) Copyright © 2023 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html).