예제 #1
0
        private static void WriteScope(LoupeLoggerProvider provider, HashSet <string> propertySet, ref Utf8JsonWriter jsonWriter, ref ByteBufferWriter buffer)
        {
            if (provider.CurrentScope is null)
            {
                return;
            }

            if (jsonWriter is null)
            {
                buffer     = new ByteBufferWriter();
                jsonWriter = new Utf8JsonWriter(buffer);
                jsonWriter.WriteStartObject();
            }
            provider.CurrentScope.Enrich(jsonWriter, propertySet);
        }