Answer the question
In order to leave comments, you need to log in
What does PyCharm expect from me?
Good evening,
People, please tell me what PyCharm wants from me?
There is a piece of code for creating a logger for recording events in the Windows EventLog:
if name is 'nt':
try:
from logging.handlers import NTEventLogHandler
win_log_handler = NTEventLogHandler(appname='update_aduser', logtype='Application')
win_log_handler.setFormatter(log_formatter)
win_logger = logging.getLogger('win_logger')
win_logger.addHandler(win_log_handler)
except ImportError:
write_log(file_logger, logging.WARNING, "cannot import 'NTEventLogHandler' module")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question