diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ActionConstraintValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ActionConstraintValues.cs index 92f603bb72..1ad5791587 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ActionConstraintValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/ActionConstraintValues.cs @@ -47,10 +47,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// Whether the action constraint is an . /// public bool IsFactory { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ActionDescriptorValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ActionDescriptorValues.cs index d02e1d55fc..bd0c719dda 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ActionDescriptorValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/ActionDescriptorValues.cs @@ -117,10 +117,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// See . /// public TypeInfo ControllerTypeInfo { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ActionModelValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ActionModelValues.cs index 6b89f81126..47d841d333 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ActionModelValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/ActionModelValues.cs @@ -91,10 +91,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// Gets the set of properties associated with the action . /// public IDictionary Properties { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ApiExplorerModelValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ApiExplorerModelValues.cs index e6431870af..0b717928ea 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ApiExplorerModelValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/ApiExplorerModelValues.cs @@ -29,10 +29,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// See . /// public string GroupName { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/AssemblyValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/AssemblyValues.cs index 9c3a4318e1..2dd5ac8a20 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/AssemblyValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/AssemblyValues.cs @@ -37,10 +37,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// Whether or not the assembly is dynamic. See . /// public bool IsDynamic { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/AttributeRouteInfoValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/AttributeRouteInfoValues.cs index 6f4dbd4ac6..4e8ea31cb6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/AttributeRouteInfoValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/AttributeRouteInfoValues.cs @@ -33,10 +33,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// The name of the route. See . /// public string Name { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/AttributeRouteModelValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/AttributeRouteModelValues.cs index ebe5bfb6c1..c8f3612c3b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/AttributeRouteModelValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/AttributeRouteModelValues.cs @@ -42,10 +42,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// Whether or not the template is absolute. See . /// public bool IsAbsoluteTemplate { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ControllerModelValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ControllerModelValues.cs index e71fb9039c..46497cc486 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ControllerModelValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/ControllerModelValues.cs @@ -94,10 +94,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// Gets the set of properties associated with the controller . /// public IDictionary Properties { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/FilterDescriptorValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/FilterDescriptorValues.cs index fcb33adc8d..e23702ad75 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/FilterDescriptorValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/FilterDescriptorValues.cs @@ -34,10 +34,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// The filter scope. See . /// public int Scope { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/FilterValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/FilterValues.cs index 030d83dac7..8bc77e2379 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/FilterValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/FilterValues.cs @@ -60,10 +60,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// A list of interfaces the implements. /// public IList FilterInterfaces { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ParameterDescriptorValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ParameterDescriptorValues.cs index 009b1bad08..f1893574c6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ParameterDescriptorValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/ParameterDescriptorValues.cs @@ -28,10 +28,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// The of the parameter. See . /// public Type ParameterType { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/ParameterModelValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/ParameterModelValues.cs index b08c6065f5..4a8fecc1c3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/ParameterModelValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/ParameterModelValues.cs @@ -30,10 +30,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// The of the parameter. /// public Type ParameterType { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/PropertyModelValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/PropertyModelValues.cs index fe5d003d3d..8bf1a1dbe3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/PropertyModelValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/PropertyModelValues.cs @@ -30,10 +30,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// The of the property. /// public Type PropertyType { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/RouteConstraintProviderValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/RouteConstraintProviderValues.cs index bef31915a4..a3035f03fd 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/RouteConstraintProviderValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/RouteConstraintProviderValues.cs @@ -39,10 +39,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// See . /// public bool BlockNonAttributedActions { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/RouteDataActionConstraintValues.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/RouteDataActionConstraintValues.cs index 6ee6dc53c7..9534ff41ab 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/RouteDataActionConstraintValues.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/RouteDataActionConstraintValues.cs @@ -33,10 +33,5 @@ namespace Microsoft.AspNet.Mvc.Logging /// The . See . /// public RouteKeyHandling KeyHandling { get; } - - public override string Format() - { - return LogFormatter.FormatLogValues(this); - } } } \ No newline at end of file diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs index 6b404b9f11..98924d7b67 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs @@ -44,13 +44,13 @@ namespace Microsoft.AspNet.Mvc Assert.Equal(1, sink.Scopes.Count); var scope = sink.Scopes[0]; Assert.Equal(typeof(DefaultActionSelector).FullName, scope.LoggerName); - Assert.Equal("DefaultActionSelector.SelectAsync", scope.Scope); + Assert.Equal("DefaultActionSelector.SelectAsync", scope.Scope.ToString()); Assert.Equal(1, sink.Writes.Count); var write = sink.Writes[0]; Assert.Equal(typeof(DefaultActionSelector).FullName, write.LoggerName); - Assert.Equal("DefaultActionSelector.SelectAsync", write.Scope); + Assert.Equal("DefaultActionSelector.SelectAsync", write.Scope.ToString()); var values = Assert.IsType(write.State); Assert.Equal("DefaultActionSelector.SelectAsync", values.Name); Assert.Empty(values.ActionsMatchingRouteConstraints); @@ -95,13 +95,13 @@ namespace Microsoft.AspNet.Mvc Assert.Equal(1, sink.Scopes.Count); var scope = sink.Scopes[0]; Assert.Equal(typeof(DefaultActionSelector).FullName, scope.LoggerName); - Assert.Equal("DefaultActionSelector.SelectAsync", scope.Scope); + Assert.Equal("DefaultActionSelector.SelectAsync", scope.Scope.ToString()); Assert.Equal(1, sink.Writes.Count); var write = sink.Writes[0]; Assert.Equal(typeof(DefaultActionSelector).FullName, write.LoggerName); - Assert.Equal("DefaultActionSelector.SelectAsync", write.Scope); + Assert.Equal("DefaultActionSelector.SelectAsync", write.Scope.ToString()); var values = Assert.IsType(write.State); Assert.Equal("DefaultActionSelector.SelectAsync", values.Name); Assert.Equal(actions, values.ActionsMatchingRouteConstraints); @@ -137,13 +137,13 @@ namespace Microsoft.AspNet.Mvc Assert.Equal(1, sink.Scopes.Count); var scope = sink.Scopes[0]; Assert.Equal(typeof(DefaultActionSelector).FullName, scope.LoggerName); - Assert.Equal("DefaultActionSelector.SelectAsync", scope.Scope); + Assert.Equal("DefaultActionSelector.SelectAsync", scope.Scope.ToString()); Assert.Equal(1, sink.Writes.Count); var write = sink.Writes[0]; Assert.Equal(typeof(DefaultActionSelector).FullName, write.LoggerName); - Assert.Equal("DefaultActionSelector.SelectAsync", write.Scope); + Assert.Equal("DefaultActionSelector.SelectAsync", write.Scope.ToString()); var values = Assert.IsType(write.State); Assert.Equal("DefaultActionSelector.SelectAsync", values.Name); Assert.Equal(actions, values.ActionsMatchingRouteConstraints); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Logging/NullLogger.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Logging/NullLogger.cs index 3d5c87925e..f6a304d3e7 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Logging/NullLogger.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Logging/NullLogger.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Mvc { public static NullLogger Instance = new NullLogger(); - public IDisposable BeginScope(object state) + public IDisposable BeginScopeImpl(object state) { return NullDisposable.Instance; } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestLogger.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestLogger.cs index b862a53ff6..3984aa308f 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestLogger.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestLogger.cs @@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Mvc public string Name { get; set; } - public IDisposable BeginScope(object state) + public IDisposable BeginScopeImpl(object state) { _scope = state; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/MvcRouteHandlerTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/MvcRouteHandlerTests.cs index 4ef10959a4..efd5199f35 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/MvcRouteHandlerTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/MvcRouteHandlerTests.cs @@ -34,11 +34,11 @@ namespace Microsoft.AspNet.Mvc // Assert var scope = Assert.Single(sink.Scopes); Assert.Equal(typeof(MvcRouteHandler).FullName, scope.LoggerName); - Assert.Equal("MvcRouteHandler.RouteAsync", scope.Scope); + Assert.Equal("MvcRouteHandler.RouteAsync", scope.Scope.ToString()); var write = Assert.Single(sink.Writes); Assert.Equal(typeof(MvcRouteHandler).FullName, write.LoggerName); - Assert.Equal("MvcRouteHandler.RouteAsync", write.Scope); + Assert.Equal("MvcRouteHandler.RouteAsync", write.Scope.ToString()); var values = Assert.IsType(write.State); Assert.Equal("MvcRouteHandler.RouteAsync", values.Name); Assert.True(values.ActionSelected); @@ -69,11 +69,11 @@ namespace Microsoft.AspNet.Mvc // Assert var scope = Assert.Single(sink.Scopes); Assert.Equal(typeof(MvcRouteHandler).FullName, scope.LoggerName); - Assert.Equal("MvcRouteHandler.RouteAsync", scope.Scope); + Assert.Equal("MvcRouteHandler.RouteAsync", scope.Scope.ToString()); var write = Assert.Single(sink.Writes); Assert.Equal(typeof(MvcRouteHandler).FullName, write.LoggerName); - Assert.Equal("MvcRouteHandler.RouteAsync", write.Scope); + Assert.Equal("MvcRouteHandler.RouteAsync", write.Scope.ToString()); var values = Assert.IsType(write.State); Assert.Equal("MvcRouteHandler.RouteAsync", values.Name); Assert.False(values.ActionSelected); @@ -105,13 +105,13 @@ namespace Microsoft.AspNet.Mvc // Assert var scope = Assert.Single(sink.Scopes); Assert.Equal(typeof(MvcRouteHandler).FullName, scope.LoggerName); - Assert.Equal("MvcRouteHandler.RouteAsync", scope.Scope); + Assert.Equal("MvcRouteHandler.RouteAsync", scope.Scope.ToString()); Assert.Equal(1, sink.Writes.Count); var write = sink.Writes[0]; Assert.Equal(typeof(MvcRouteHandler).FullName, write.LoggerName); - Assert.Equal("MvcRouteHandler.RouteAsync", write.Scope); + Assert.Equal("MvcRouteHandler.RouteAsync", write.Scope.ToString()); var values = Assert.IsType(write.State); Assert.Equal("MvcRouteHandler.RouteAsync", values.Name); Assert.True(values.ActionSelected); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/InnerAttributeRouteTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/InnerAttributeRouteTest.cs index 9f86fc4694..3bf33bf61d 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/InnerAttributeRouteTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/InnerAttributeRouteTest.cs @@ -926,13 +926,13 @@ namespace Microsoft.AspNet.Mvc.Routing Assert.Equal(1, sink.Scopes.Count); var scope = sink.Scopes[0]; Assert.Equal(typeof(AttributeRoute).FullName, scope.LoggerName); - Assert.Equal("AttributeRoute.RouteAsync", scope.Scope); + Assert.Equal("AttributeRoute.RouteAsync", scope.Scope.ToString()); Assert.Equal(1, sink.Writes.Count); var write = sink.Writes[0]; Assert.Equal(typeof(AttributeRoute).FullName, write.LoggerName); - Assert.Equal("AttributeRoute.RouteAsync", write.Scope); + Assert.Equal("AttributeRoute.RouteAsync", write.Scope.ToString()); var values = Assert.IsType(write.State); Assert.Equal("AttributeRoute.RouteAsync", values.Name); Assert.True(values.Handled); @@ -957,13 +957,13 @@ namespace Microsoft.AspNet.Mvc.Routing Assert.Equal(1, sink.Scopes.Count); var scope = sink.Scopes[0]; Assert.Equal(typeof(AttributeRoute).FullName, scope.LoggerName); - Assert.Equal("AttributeRoute.RouteAsync", scope.Scope); + Assert.Equal("AttributeRoute.RouteAsync", scope.Scope.ToString()); Assert.Equal(1, sink.Writes.Count); var write = sink.Writes[0]; Assert.Equal(typeof(AttributeRoute).FullName, write.LoggerName); - Assert.Equal("AttributeRoute.RouteAsync", write.Scope); + Assert.Equal("AttributeRoute.RouteAsync", write.Scope.ToString()); var values = Assert.IsType(write.State); Assert.Equal("AttributeRoute.RouteAsync", values.Name); Assert.False(values.Handled); diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/Logging/LoggingActionSelectionTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/Logging/LoggingActionSelectionTest.cs index 7a44c89fc8..464326708f 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/Logging/LoggingActionSelectionTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/Logging/LoggingActionSelectionTest.cs @@ -75,6 +75,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests // Assert Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + var logs = await GetLogsAsync(client, requestTraceId); var scopeNode = logs.FindScope(nameof(MvcRouteHandler) + ".RouteAsync"); diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/TagHelperSampleTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/TagHelperSampleTest.cs index fe6490e7b9..1b9d5a7e78 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/TagHelperSampleTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/TagHelperSampleTest.cs @@ -82,7 +82,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests return false; } - public IDisposable BeginScope(object scope) + public IDisposable BeginScopeImpl(object scope) { return new TestDisposable(); } diff --git a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/ScriptTagHelperTest.cs b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/ScriptTagHelperTest.cs index 54e713e313..0ec353b137 100644 --- a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/ScriptTagHelperTest.cs +++ b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/ScriptTagHelperTest.cs @@ -367,7 +367,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers Assert.Equal(LogLevel.Verbose, logger.Logged[1].LogLevel); Assert.IsAssignableFrom(logger.Logged[1].State); Assert.StartsWith("Skipping processing for Microsoft.AspNet.Mvc.TagHelpers.ScriptTagHelper", - ((ILogValues)logger.Logged[1].State).Format()); + ((ILogValues)logger.Logged[1].State).ToString()); } [Fact] @@ -422,7 +422,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers Assert.Equal(LogLevel.Verbose, logger.Logged[0].LogLevel); Assert.IsAssignableFrom(logger.Logged[0].State); Assert.StartsWith("Skipping processing for Microsoft.AspNet.Mvc.TagHelpers.ScriptTagHelper", - ((ILogValues)logger.Logged[0].State).Format()); + ((ILogValues)logger.Logged[0].State).ToString()); } [Fact] diff --git a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/TagHelperLogger.cs b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/TagHelperLogger.cs index a73ad3ed64..2cbaf9dc52 100644 --- a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/TagHelperLogger.cs +++ b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/TagHelperLogger.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers { public List Logged { get; } = new List(); - public IDisposable BeginScope(object state) + public IDisposable BeginScopeImpl(object state) { return null; } diff --git a/test/WebSites/LoggingWebSite/ElmLogSerializerMiddleware.cs b/test/WebSites/LoggingWebSite/ElmLogSerializerMiddleware.cs index c791991dfd..fe8e02bc6f 100644 --- a/test/WebSites/LoggingWebSite/ElmLogSerializerMiddleware.cs +++ b/test/WebSites/LoggingWebSite/ElmLogSerializerMiddleware.cs @@ -97,7 +97,7 @@ namespace LoggingWebSite private void CopyScopeNodeTree(ScopeNode root, ScopeNodeDto rootDto) { rootDto.LoggerName = root.Name; - rootDto.State = root.State; + rootDto.State = root.State?.ToString(); rootDto.StateType = root.State?.GetType(); foreach (var logInfo in root.Messages)