Sound like a logging setup.
Example:
There are many cases where not give all error message to users make sense,
server,GUI...ect.
Example:
import my_log def add(x, y): try: return(x + y) except Exception as error: my_log.logger.exception('msg') if __name__ == '__main__': my_log.logger.info('Start') value = add(33, '50') my_log.logger.debug(value) my_log.logger.info('Finish') print(value)One run without error and one with
'50'
There are many cases where not give all error message to users make sense,
server,GUI...ect.
logg.log
:Output:2018-01-17 08:35:50,623 - my_log - INFO - Start
2018-01-17 08:35:50,623 - my_log - DEBUG - 83
2018-01-17 08:35:50,623 - my_log - INFO - Finish
2018-01-17 08:36:18,791 - my_log - INFO - Start
2018-01-17 08:36:18,791 - my_log - ERROR - msg
Traceback (most recent call last):
File "_logging.py", line 5, in add
return(x + y)
TypeError: unsupported operand type(s) for +: 'int' and 'str'
2018-01-17 08:36:18,791 - my_log - DEBUG - None
2018-01-17 08:36:18,795 - my_log - INFO - Finish
setup my_log.py
: