File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
LibraryManagement.Api/Brokers/Loggings Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ //-----------------------------------------------------------
2+ // Copyright (c) Coalition of Good-Hearted Engineers
3+ // Free To Use To Build Reliable Library Management Solutions
4+ //-----------------------------------------------------------
5+
6+ namespace LibraryManagement . Api . Brokers . Loggings
7+ {
8+ public interface ILoggingBroker
9+ {
10+ void LogError ( Exception exception ) ;
11+ void LogCritical ( Exception exception ) ;
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ //-----------------------------------------------------------
2+ // Copyright (c) Coalition of Good-Hearted Engineers
3+ // Free To Use To Build Reliable Library Management Solutions
4+ //-----------------------------------------------------------
5+
6+ namespace LibraryManagement . Api . Brokers . Loggings
7+ {
8+ public class LoggingBroker : ILoggingBroker
9+ {
10+ private readonly ILogger < LoggingBroker > logger ;
11+
12+ public LoggingBroker ( ILogger < LoggingBroker > logger ) =>
13+ this . logger = logger ;
14+
15+ public void LogError ( Exception exception ) =>
16+ this . logger . LogError ( exception , exception . Message ) ;
17+
18+ public void LogCritical ( Exception exception ) =>
19+ this . logger . LogCritical ( exception , exception . Message ) ;
20+ }
21+ }
You can’t perform that action at this time.
0 commit comments