wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Logging in .NET

Total questions: 8

Worksheet time: 3mins

Name
Class
Date
1.

Benefit of structured logging?

a)

Log data can be query

b)

Faster logging

c)

Less code

d)

Easy to debug

2.

What is the standard logging library in .NET?

a)

Microsoft.Extension.Logging

b)

System.Extension.Logging

c)

System.Logging

d)

Microsoft.Logging

3.

What can Serilog be used in a .NET application?

a)

Log provider for MEL

b)

A Logging framework

c)

Library to store data to File

d)

A Frontend UI module

4.

What is the purpose of an enricher in Serilog?

a)

Updating properties from logevent

b)

Removing properties from logevent

c)

Adding properties to logevent

d)

Deleting properties from logevent

5.

What is the purpose of sinks?

a)

Nothing

b)

Enrich logevent with new properties

c)

Writing log events to storage in various format

d)

Filter logevent before writing to storage

6.

When do you want to config a sublogger in Serilog?

WriteTo.Logger()

a)

Log properties sent to another sinks should differ

b)

When you want to write to database

c)

When you want to write to a custom sink

d)

You should not config sublogger

7.

When can LogEvent from Microsoft namespace get logged to Console?

a)

level == Information

b)

level >= Information

c)

level >= Warning

d)

level > Warning

8.

.Filter.ByExcluding(le => Matching.FromSource("System")(le) && le.Level <= LogEventLevel.Information)

Can logevent with SourceContext = 'System.*' get logged with that filter?

a)

Always

b)

Never

c)

Only when level > Information

d)

Only when level <= Information