import logging

class MyException(Exception):
	def __str__(self):
		return 'str() was called'

try:
	raise MyException()
except Exception as e:
	logging.exception(e)
