<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exception_logging(exctype, value, tb):
 """ Log exception by using the root logger. Use it as `sys.excepthook = exception_logging`. Parameters exctype : type value : NameError tb : traceback """

    write_val = {'exception_type': str(exctype),
                 'message': str(traceback.format_tb(tb, 10))}
    logging.exception(str(write_val))