File tree Expand file tree Collapse file tree 4 files changed +5
-20
lines changed
samples/logging/custom-factory/Core_10/Sample Expand file tree Collapse file tree 4 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ public void Level(LogLevel level)
11
11
this . level = level ;
12
12
}
13
13
14
- protected override ILoggerFactory GetLoggingFactory ( )
15
- {
16
- return new ConsoleLoggerFactory ( level ) ;
17
- }
14
+ protected override ILoggerFactory GetLoggingFactory ( ) => new ConsoleLoggerFactory ( level ) ;
18
15
}
19
16
#endregion
Original file line number Diff line number Diff line change 5
5
class ConsoleLoggerFactory ( LogLevel level ) :
6
6
ILoggerFactory
7
7
{
8
- public ILog GetLogger ( Type type )
9
- {
10
- return GetLogger ( type . FullName ) ;
11
- }
12
-
13
- public ILog GetLogger ( string name )
14
- {
15
- return new ConsoleLog ( name , level ) ;
16
- }
8
+ public ILog GetLogger ( Type type ) => GetLogger ( type . FullName ) ;
9
+ public ILog GetLogger ( string name ) => new ConsoleLog ( name , level ) ;
17
10
}
18
11
19
12
#endregion
Original file line number Diff line number Diff line change 1
1
using NServiceBus ;
2
2
3
- public class MyMessage :
4
- IMessage
5
- {
6
- }
3
+ public class MyMessage : IMessage ;
Original file line number Diff line number Diff line change 11
11
#region ConfigureLogging
12
12
var loggerDefinition = LogManager . Use < ConsoleLoggerDefinition > ( ) ;
13
13
loggerDefinition . Level ( LogLevel . Info ) ;
14
-
15
- var endpointConfiguration = new EndpointConfiguration ( "Samples.Logging.CustomFactory" ) ;
16
-
17
14
#endregion
15
+ var endpointConfiguration = new EndpointConfiguration ( "Samples.Logging.CustomFactory" ) ;
18
16
endpointConfiguration . UseSerialization < SystemJsonSerializer > ( ) ;
19
17
endpointConfiguration . UseTransport < LearningTransport > ( ) ;
20
18
You can’t perform that action at this time.
0 commit comments