1- using Microsoft . Extensions . Logging ;
1+ using EasyWay . Internals . BusinessRules ;
2+ using Microsoft . Extensions . Logging ;
23
34namespace EasyWay . Internals . Queries . Loggers
45{
@@ -9,18 +10,34 @@ internal sealed partial class EasyWayLogger<TModule>
910
1011 public EasyWayLogger ( ILogger < TModule > logger ) => _logger = logger ;
1112
12- //TODO scope logger CorrelationId (ScopeId)
13-
1413 [ LoggerMessage ( 0 , LogLevel . Information , "Executing {@component}" , SkipEnabledCheck = true ) ]
1514 public partial void Executing ( object component ) ;
1615
17- [ LoggerMessage ( 1 , LogLevel . Information , "Executed" , SkipEnabledCheck = true ) ]
18- public partial void Executed ( ) ;
16+ [ LoggerMessage ( 1 , LogLevel . Information , "Successed" , SkipEnabledCheck = true ) ]
17+ public partial void Successed ( ) ;
18+
19+ [ LoggerMessage ( 2 , LogLevel . Information , "Successed: {@result}" , SkipEnabledCheck = true ) ]
20+ public partial void Successed ( object result ) ;
21+
22+ [ LoggerMessage ( 3 , LogLevel . Information , "Validation error: {@validatonErrors}" , SkipEnabledCheck = true ) ]
23+ public partial void Validation ( IDictionary < string , string [ ] > validatonErrors ) ;
24+
25+ [ LoggerMessage ( 4 , LogLevel . Information , "Broken business rule: {@brokenBusinessRule}" , SkipEnabledCheck = true ) ]
26+ public partial void BrokenBusinessRule ( BusinessRule brokenBusinessRule ) ;
27+
28+ [ LoggerMessage ( 5 , LogLevel . Information , "Not found" , SkipEnabledCheck = true ) ]
29+ public partial void NotFound ( ) ;
30+
31+ [ LoggerMessage ( 6 , LogLevel . Information , "Operation canceled" , SkipEnabledCheck = true ) ]
32+ public partial void OperationCanceled ( ) ;
33+
34+ [ LoggerMessage ( 7 , LogLevel . Warning , "Forbidden" , SkipEnabledCheck = true ) ]
35+ public partial void Forbidden ( ) ;
1936
20- [ LoggerMessage ( 2 , LogLevel . Information , "Failed " , SkipEnabledCheck = true ) ]
21- public partial void Failed ( ) ;
37+ [ LoggerMessage ( 8 , LogLevel . Warning , "Concurrency conflict " , SkipEnabledCheck = true ) ]
38+ public partial void ConcurrencyConflict ( Exception exception ) ;
2239
23- [ LoggerMessage ( 3 , LogLevel . Error , "Unexpected exception" , SkipEnabledCheck = true ) ]
40+ [ LoggerMessage ( 500 , LogLevel . Error , "Unexpected exception" , SkipEnabledCheck = true ) ]
2441 public partial void UnexpectedException ( Exception exception ) ;
2542 }
2643}
0 commit comments