Inheritance: MetroLog.Targets.StreamingFileTarget
        public async Task TestCurrentManagedThreadIdMatchesCaller()
        {
            var loggingConfiguration = new LoggingConfiguration();
            var target = new TestFileTarget(new CurrentManagedThreadIdLayout());

            loggingConfiguration.AddTarget(LogLevel.Trace, LogLevel.Fatal, target);
            LogManagerFactory.DefaultConfiguration = loggingConfiguration;
            var log = (ILoggerAsync)LogManagerFactory.DefaultLogManager.GetLogger <FileStreamingTargetTests>();

            for (int i = 0; i < 100; i++)
            {
                var expectedThreadId = Environment.CurrentManagedThreadId;
                await log.TraceAsync("What thread am I?");

                var output = target.Stream.ToArray();
                target.Stream.Position = 0;
                var loggedThreadId = int.Parse(Encoding.UTF8.GetString(output, 0, output.Length));
                Assert.Equal(expectedThreadId, loggedThreadId);
            }
        }
        public async Task TestCurrentManagedThreadIdMatchesCaller()
        {
            var loggingConfiguration = new LoggingConfiguration();
            var target = new TestFileTarget(new CurrentManagedThreadIdLayout());
            loggingConfiguration.AddTarget(LogLevel.Trace, LogLevel.Fatal, target);
            LogManagerFactory.DefaultConfiguration = loggingConfiguration;
            var log = (ILoggerAsync)LogManagerFactory.DefaultLogManager.GetLogger<FileStreamingTargetTests>();

            for (int i = 0; i < 100; i++)
            {
                var expectedThreadId = Environment.CurrentManagedThreadId;
                await log.TraceAsync("What thread am I?");
                var output = target.Stream.ToArray();
                target.Stream.Position = 0;
                var loggedThreadId = int.Parse(Encoding.UTF8.GetString(output, 0, output.Length));
                Assert.Equal(expectedThreadId, loggedThreadId);
            }
        }