QuestionQ45

VerifiedCoding Conventions, Best Practices, and Standardization

Choose a log entry that conforms to this format:

'%(name)s[%(levelname)s][%(asctime)s]:%(message)s'

Explanation

Python’s logging formatter substitutes %(name)s, %(levelname)s, %(asctime)s, and %(message)s in that order. With no custom datefmt, the default asctime includes a comma followed by milliseconds, while the specified format requires square brackets around the level and timestamp and a colon before the message.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!