GelfLayout - Supports ExtraFields and IncludeMdlc
-
Introduced GetlfLayout with support for adding extra fields:
The following changes has also been made:
- Reduced allocations by writing message directly to JsonTextWriter (Skips allocation of internal GelfMessage-object and JObject-object).
- Reduced allocations by writing custom fields directly to JsonTextWriter (Skips allocations of JToken for primitive types).
- Added support for NLog ThreadSafe-attribute for improved concurrency in async-mode.
- Added option IncludeLegacyFields so one can skip deprecated fields (according to GELF 1.1 spec)
- Added fallback to Logger-name, when CallSite FilePath is null / empty.
Thanks @snakefoot for this contribution