I am trying to convert the traceback function of a script such that it gets printed in my logging module. But I am unable to do so as it is not getting printed properly. How