def __init__(self, *args, **kwargs):
if ('<STR_LIT>' in kwargs):<EOL><INDENT>self._new_constuctor(**kwargs)<EOL><DEDENT>elif (len(args) >= <NUM_LIT:3>):<EOL><INDENT>self._old_constructor(args[<NUM_LIT:0>], args[<NUM_LIT:1>], args[<NUM_LIT:2>])<EOL><DEDENT>self._logs_dir = self.master_config.mapping.get("<STR_LIT>") if "<STR_LIT>" in self.master_config.mapping elseself.dynamic_config_module.LOGS_DIRECTORY<EOL>try:<EOL><INDENT>utils.makedirs(self._logs_dir)<EOL><DEDENT>except:<EOL><INDENT>logger.error("<STR_LIT>".format(self._logs_dir))<EOL>self._logs_dir = None<EOL><DEDENT>def wrap(func):<EOL><INDENT>def helper( unique_id ):<EOL><INDENT>try:<EOL><INDENT>return func( unique_id)<EOL><DEDENT>except:<EOL><INDENT>return func().get(unique_id, [])<EOL><DEDENT><DEDENT>return helper<EOL><DEDENT>def assign_log_methods( method_name):<EOL><INDENT>if not hasattr( self.dynamic_config_module, method_name):<EOL><INDENT>setattr(self.dynamic_config_module, method_name,lambda unique_id:  [])<EOL><DEDENT>else:<EOL><INDENT>setattr(self.dynamic_config_module,method_name,<EOL>wrap(getattr( self.dynamic_config_module, method_name,self.dynamic_config_module)))<EOL><DEDENT><DEDENT>for method_name in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>" ):<EOL><INDENT>assign_log_methods( method_name )<EOL><DEDENT>if not hasattr( self.dynamic_config_module, "<STR_LIT>"):<EOL><INDENT>setattr( self.dynamic_config_module, "<STR_LIT>", wrap( lambda unique_id: constants.FILTER_NAME_ALLOW_NONE ))<EOL><DEDENT>else:<EOL><INDENT>self.dynamic_config_module.log_patterns = wrap( self.dynamic_config_module.log_patterns)<EOL><DEDENT>self._output_dir = self.master_config.mapping.get("<STR_LIT>") or self.dynamic_config_module.OUTPUT_DIRECTORY<EOL>self._failed_count = <NUM_LIT:0><EOL>self._success_count = <NUM_LIT:0><EOL>
:param kwargs:
:return: