Skip to content

Instantly share code, notes, and snippets.

@a-yasui
Created Oct 18, 2016
Embed
What would you like to do?
logger の設定テンプレ
#!/usr/bin/env python
import logging
from logging import getLogger, StreamHandler, DEBUG
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s (%(threadName)-10s) %(levelname)s %(message)s")
logger = getLogger(__name__)
handler = StreamHandler()
handler.setLevel(DEBUG)
logger.setLevel(DEBUG)
logger.addHandler(handler)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment