handlers logging handlers nteventloghandler that sends message to windows event log logging handlers httphandler which sends messages to http server logging nullhandler that does nothing with error messages this is often used by library developers who want to include logging in their applications but expect developers to set up an appropriate handler when they use the library all of these handlers can be configured programmatically or via configuration file setting the root output handler the following exampleuses the logging basicconfig(function to set up the root logger to use filehandler that will write the log messages to file called 'example log'import logging sets file handler on the root logger to save log messages to the example log file logging basicconfig(filename='example log,level=logging debugif no handler is explicitly set on the name logger it will delegate the messages to the parent logger to handle logger logging getlogger(__name__logger debug('this is to help with debugginglogger info('this is just for informationlogger warning('this is warning!logger error('this should be used with something unexpectedlogger critical('something seriousnote that if no handler is specified for named logger then it delegates output to the parent (in this case the rootlogger the file generated for the above program is shown below