Font size
WorksheetsLogging in .NET
Total questions: 8
Worksheet time: 3mins
Benefit of structured logging?
Log data can be query
Faster logging
Less code
Easy to debug
What is the standard logging library in .NET?
Microsoft.Extension.Logging
System.Extension.Logging
System.Logging
Microsoft.Logging
What can Serilog be used in a .NET application?
Log provider for MEL
A Logging framework
Library to store data to File
A Frontend UI module
What is the purpose of an enricher in Serilog?
Updating properties from logevent
Removing properties from logevent
Adding properties to logevent
Deleting properties from logevent
What is the purpose of sinks?
Nothing
Enrich logevent with new properties
Writing log events to storage in various format
Filter logevent before writing to storage
When do you want to config a sublogger in Serilog?
WriteTo.Logger()
Log properties sent to another sinks should differ
When you want to write to database
When you want to write to a custom sink
You should not config sublogger
When can LogEvent from Microsoft namespace get logged to Console?
level == Information
level >= Information
level >= Warning
level > Warning
.Filter.ByExcluding(le => Matching.FromSource("System")(le) && le.Level <= LogEventLevel.Information)
Can logevent with SourceContext = 'System.*' get logged with that filter?
Always
Never
Only when level > Information
Only when level <= Information
