Question 16
Consider the following Python code snippet.
log.py
import loggingimport sys
logging.basicConfig(level=logging.WARNING, format='%(asctime)s - %(levelname)s - %(message)s')
def check_val(value): if value < 0: raise ValueError("Invalid value: Please enter a positive value.") else: logging.info("Value added: %s", value)
try: input_value = int(sys.argv[1]) check_val(input_value)except ValueError as ve: logging.exception("Exception occurred: %s", str(ve))What will be the output on the terminal for the command: python log.py 34?