E-mail : support@tech2now.in

Logging in Python

We can log in to Python in the following way.

import logging
 
logging.basicConfig(format='%(message)s')
log = logging.getLogger(__name__)
log.warning('Error: Null Pointer Exception')
OutPut:
Error: Null Pointer Exception

GitHub Repository URL