Quiz 3 - Logging

  • Due No due date
  • Points 100
  • Questions 5
  • Time Limit 20 Minutes

Instructions

In this quiz, you’ll test your understanding of Python’s logging module.

Attempt History

Attempt Time Score
LATEST Attempt 1 5 minutes 90 out of 100
Score for this quiz: 90 out of 100
Submitted Sep 26 at 7:25pm
This attempt took 5 minutes.
 
Question 1
10 / 20 pts
0 multiple_dropdowns_question   2688123
When you configure logging, you can use basicConfig , which accepts various arguments. To log all events at or above the DEBUG level, you can set the None of the above parameter like this:
Answer 1:
Correct!
exact_answer a 1847415 9007
exact_answer a 1847415 3115
exact_answer a 1847415 1829
exact_answer a 1847415 9439
Answer 2:
Correct Answer
exact_answer b 1847415 6591
exact_answer b 1847415 2740
You Answered
exact_answer b 1847415 6486
 
Question 2
20 / 20 pts
0 multiple_dropdowns_question   2688125
To create a separate configuration for your logging, you can use a configuration file and load it using fileConfig()  or create a dictionary and load it using dictConfig()
Answer 1:
exact_answer a 1847249 7931
exact_answer a 1847249 8103
Correct!
exact_answer a 1847249 3471
exact_answer a 1847249 7220
Answer 2:
exact_answer b 1847249 1573
Correct!
exact_answer b 1847249 8212
exact_answer b 1847249 5216
exact_answer b 1847249 7690
 
Question 3
20 / 20 pts
0 multiple_choice_question   2688128

How do you ensure that your log messages include exception information?

-Something needs to be done.

 
exact_answer none 1847252 1716
Correct!
 
exact_answer none 1847252 7776
 
exact_answer none 1847252 9895
 
exact_answer none 1847252 191
 
Question 4
20 / 20 pts
0 multiple_answers_question   2688122

What are some of the capabilities of Python’s logging module?

Think about the different scales of projects you might work on and how you may need to adapt a logging system to fit those various needs.

 

 
exact_answer none 1847417 9772
Correct!
 
exact_answer none 1847417 1727
 
exact_answer none 1847417 988
Correct!
 
exact_answer none 1847417 8241
 
exact_answer none 1847417 9544
 
Question 5
20 / 20 pts
0 multiple_choice_question   2688129

Why might you want to set multiple handlers with different severity levels for the same logger?

 
exact_answer none 1847416 5121
Correct!
 
exact_answer none 1847416 6241
 
exact_answer none 1847416 4554
 
exact_answer none 1847416 5253
Quiz Score: 90 out of 100