File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
src/Bing.Logging/Bing/Logging
tests/Bing.Logging.Serilog.Tests Expand file tree Collapse file tree 3 files changed +9
-5
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 . Key , item . Value ) ;
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+ }
Original file line number Diff line number Diff line change 22 <PropertyGroup >
33 <VersionMajor >2</VersionMajor >
44 <VersionMinor >2</VersionMinor >
5- <VersionPatch >7 </VersionPatch >
5+ <VersionPatch >8 </VersionPatch >
66 <VersionQuality >20221020-1</VersionQuality >
77 <VersionPrefix >$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix >
88 <!-- <VersionSuffix>preview-$(VersionQuality)</VersionSuffix>-->
You can’t perform that action at this time.
0 commit comments