You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
550 B
17 lines
550 B
import logging
|
|
from conf import __LOGLEVEL__
|
|
|
|
logging.basicConfig( format='%(asctime)s [%(levelname)s] %(funcName)s: %(message)s',
|
|
# filename='test.log',
|
|
level=__LOGLEVEL__)
|
|
|
|
def testlogging():
|
|
print('testlogging() aufgerufen.')
|
|
logging.debug('DEBUG/Druckdaten werden gesendet.')
|
|
logging.info('INFO/Es werden 2 Seiten gedruckt')
|
|
logging.warning('WARN/nicht genügend Papier im Drucker')
|
|
logging.error('ERROR/Drucker nicht gefunden.')
|
|
logging.critical('CRITICAL/Drucker brennt')
|
|
|
|
if __name__ == '__main__':
|
|
testlogging()
|
|
|