<s> import os <EOL> import syslog <EOL> import traceback <EOL> import sys <EOL> import logging <EOL> from laikaboss . objectmodel import QuitScanException , GlobalScanTimeoutError , GlobalModuleTimeoutError <EOL> def log_debug ( message ) : <EOL> syslog . syslog ( syslog . LOG_DEBUG , "<STR_LIT>" % message ) <EOL> for module in os . listdir ( os . path . dirname ( __file__ ) ) : <EOL> try : <EOL> if module == '<STR_LIT>' or module [ - <NUM_LIT:3> : ] != '<STR_LIT>' : <EOL> continue <EOL> _temp = __import__ ( module [ : - <NUM_LIT:3> ] , locals ( ) , globals ( ) , [ module [ : - <NUM_LIT:3> ] . upper ( ) ] , - <NUM_LIT:1> ) <EOL> globals ( ) [ module [ : - <NUM_LIT:3> ] . upper ( ) ] = getattr ( _temp , module [ : - <NUM_LIT:3> ] . upper ( ) ) <EOL> except ( QuitScanException , GlobalScanTimeoutError , GlobalModuleTimeoutError ) : <EOL> raise <EOL> except : <EOL> exc_type , exc_value , exc_traceback = sys . exc_info ( ) <EOL> logging . exception ( "<STR_LIT>" % ( module , repr ( traceback . format_exception ( exc_type , exc_value , exc_traceback ) ) ) ) <EOL> log_debug ( "<STR_LIT>" % ( module , repr ( traceback . format_exception ( exc_type , exc_value , exc_traceback ) ) ) ) <EOL> continue <EOL> del module <EOL> del _temp </s>
