Skip to content

Commit e0994dc

Browse files
authored
Update README.md
1 parent c68cc0c commit e0994dc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ Log.Logger = new LoggerConfiguration()
3636
.CreateLogger();
3737
```
3838

39+
To get tags to populate on the exceptionless UI, add a `Tags` string enumerable to any log.
40+
41+
```Example with Serilog:
42+
Serilog: Log.ForContext("Tags", new List() { "Tag1", "Tag2"}).Information("Seri info");
43+
```
44+
45+
```Example with ILogger
46+
using (var scope = _logger.BeginScope(new Dictionary<string, object> { ["Tags"] = new string[] { "Tag1", "Tag2" }}))
47+
{
48+
_logger.Log(logLevel, eventId, state, exception, formatter);
49+
}
50+
```
51+
3952
* [Documentation](https://github.com/serilog/serilog/wiki)
4053

4154
Copyright &copy; 2023 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html).

0 commit comments

Comments
 (0)