HuggingFaceM4/VLM_WebSight_finetuned
Text Generation
•
Updated
•
310
•
176
#Call built in library
import logging
# lets call library and start logging
logging.basicConfig(level=logging.DEBUG) #you can add more format specifier
# It will show on the console since we did not added filename to save logs
logging.debug('Here we go for debug message')
logging.info('Here we go for info message')
logging.warning('Here we go for warning message')
logging.error('Here we go for error message')
logging.critical('Here we go for critical message')
#Note:
# If you want to add anything in the log then do like this way
records=100
logging.debug('There are total %s number of records.', records)
# same like string format
lost=20
logging.debug('There are total %s number of records from which %s are lost', records, lost)
import logging
# Saving the log to a file. The logs will be written to app.log
logging.basicConfig(filename='app.log', level=logging.DEBUG)
logging.debug('Here we go for debug message')
logging.info('Here we go for info message')
logging.warning('Here we go for warning message')
logging.error('Here we go for error message')
logging.critical('Here we go for critical message')