Log.debug() suppresses output of the log message based on the log level, but Python still creates the strings provided as input to log.debug(). Suppressing creation of the debug strings when not debugging provides a noticeable speedup.
CAUTION: This email originated from outside of the Walmart organization. Do not click links or open attachments unless you recognize the sender and know the content. Report suspicious emails to Email Abuse.
return
self.modules.append(m)
for name, _sub in m.subs.items():
log.debug('(1) storing sub "%s" in globals' % name)
if (log.getEffectiveLevel() == logging.DEBUG):
@kirk-sayre-workhttps://github.com/kirk-sayre-work, just curious: why do you need to check log.getEffectiveLevel? Normally this is exactly what log.debug does, it only logs the message if the logging level matches DEBUG.
Log.debug() suppresses output of the log message based on the log level, but Python still creates the strings provided as input to log.debug(). Suppressing creation of the debug strings when not debugging provides a noticeable speedup.
Kirk Sayre Dynamic Defense Engineering Team
From: Philippe Lagadec notifications@github.com Sent: Tuesday, June 9, 2020 3:16 AM To: decalage2/ViperMonkey ViperMonkey@noreply.github.com Cc: Kirk Sayre Kirk.Sayre@walmart.com; Mention mention@noreply.github.com Subject: EXT: Re: [decalage2/ViperMonkey] update from Kirk Sayre's fork April 2020 (#97)
CAUTION: This email originated from outside of the Walmart organization. Do not click links or open attachments unless you recognize the sender and know the content. Report suspicious emails to Email Abuse.
@decalage2 commented on this pull request.
In vipermonkey/core/init.pyhttps://github.com/decalage2/ViperMonkey/pull/97#discussion_r437220337:
log.debug('(1) storing sub "%s" in globals' % name)
if (log.getEffectiveLevel() == logging.DEBUG):
@kirk-sayre-workhttps://github.com/kirk-sayre-work, just curious: why do you need to check log.getEffectiveLevel? Normally this is exactly what log.debug does, it only logs the message if the logging level matches DEBUG.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/decalage2/ViperMonkey/pull/97#pullrequestreview-426893720, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHEDHZPT6QPQZP4RAVIMGODRVXVTXANCNFSM4MHFG3RA.