Challenge
Logging instead of print
…full of prints left over from debugging. Replace them with logging calls at the right levels, so debug records stay hidden until switched on, then give the fuel code its own named logger.
5 results
Challenge
…full of prints left over from debugging. Replace them with logging calls at the right levels, so debug records stay hidden until switched on, then give the fuel code its own named logger.
Challenge
…then let a minimum level decide what counts, the way logging tools filter by severity.
Article Python Fundamentals
…Special characters and line breaks When logging space mission data, you often need to organize information across multiple lines. The newline character "\n" is like pressing the "Enter" key in your…
Challenge
Replace all but the last four characters of an access code with * using len(), slicing and string repetition, then find a code inside a log line and mask it there before the line is saved.
Challenge
…Levels nobody planned for The engineers switched on debug logging, and the starter code now stops with KeyError: 'DEBUG' . Count any level that turns up, and print the levels in alphabetical order, so…