File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/Bing.Logging/Bing/Logging
tests/Bing.Logging.Serilog.Tests Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,10 @@ protected virtual void ConvertStateToContent()
269269 {
270270 if ( item . Value . SafeString ( ) . IsEmpty ( ) )
271271 continue ;
272- LogProperties . Add ( item ) ;
272+ if ( LogProperties . ContainsKey ( item . Key ) )
273+ LogProperties [ item . Key ] = item . Value ;
274+ else
275+ LogProperties . Add ( item . Key , item . Value ) ;
273276 }
274277 }
275278
Original file line number Diff line number Diff line change @@ -113,8 +113,9 @@ public void Test_LogTrace_Message_9()
113113 _log . EventId ( 119 )
114114 . Message ( "Test_LogTrace_Message_9_{id}" , $ "id_{ Id . NewString ( ) } ")
115115 . State ( new Product { Code = "a" , Name = "b" , Price = 123 } )
116- . Property ( "Age" , "18" )
117- . Property ( "Description" , "hello" )
116+ . Property ( "Code" , "a" )
117+ . Property ( "Age" , "18" )
118+ . Property ( "Description" , "hello" )
118119 . LogTrace ( ) ;
119120 }
120121
@@ -142,4 +143,4 @@ public void Test_LogTrace_Property_2()
142143 . State ( new Product { Code = "a" , Name = "b" , Price = 123 } )
143144 . LogTrace ( ) ;
144145 }
145- }
146+ }
You can’t perform that action at this time.
0 commit comments