Removes the old Log action from types
354788
def remove_log_action(portal):
    
    logger.info("Removing Log Tab ...")
    portal_types = api.get_tool("portal_types")
    for name in portal_types.listContentTypes():
        ti = portal_types[name]
        actions = map(lambda action: action.id, ti._actions)
        for index, action in enumerate(actions):
            if action == "log":
                logger.info("Removing Log Action for {}".format(name))
                ti.deleteActions([index])
                break
    logger.info("Removing Log Tab [DONE]")
398043
def removed_or_inserted_action(mapper, connection, target):
    """"""
    current_access.delete_action_cache(get_action_cache_key(target.action,
                                                            target.argument))
242562
def __remove_actions(self):
        

        LOGGER.debug("> Removing '{0}' Component actions.".format(self.__class__.__name__))

        remove_project_action = "Actions|Umbra|Components|factory.script_editor|&File|Remove Project"
        self.__script_editor.command_menu.removeAction(self.__engine.actions_manager.get_action(remove_project_action))
        self.__engine.actions_manager.unregister_action(remove_project_action)
360080
def remove_file_handlers(logger=None):
    
    if not isinstance(logger, logging.Logger):
        logger = logging.getLogger(logger)

    new_handlers = []
    for handler in logger.handlers:
        if isinstance(handler, logging.FileHandler):
            handler.close()
        else:
            new_handlers.append(handler)
    logger.handlers = new_handlers
44149
def cleanup(logger, *args):
    """"""
    for obj in args:
        if obj is not None and hasattr(obj, 'cleanup'):
            try:
                obj.cleanup()
            except NotImplementedError:
                pass
            except Exception:
                logger.exception("Unable to cleanup %s object", obj)
1020273
private void resetLoggedInOutIndicators() {
		getLoggedInIndicaterRegexField().setToolTipText(null);
		getLoggedInIndicaterRegexField().setEnabled(true);
		getLoggedOutIndicaterRegexField().setToolTipText(null);
		getLoggedOutIndicaterRegexField().setEnabled(true);
	}
929151
static synchronized void clearLogContext() {
        final LogContext embeddedLogContext = Holder.LOG_CONTEXT;
        // Remove the configurator and clear the log context
        final Configurator configurator = embeddedLogContext.getLogger("").detach(Configurator.ATTACHMENT_KEY);
        // If this was a PropertyConfigurator we can use the LogContextConfiguration API to tear down the LogContext
        if (configurator instanceof PropertyConfigurator) {
            final LogContextConfiguration logContextConfiguration = ((PropertyConfigurator) configurator).getLogContextConfiguration();
            clearLogContext(logContextConfiguration);
        } else if (configurator instanceof LogContextConfiguration) {
            clearLogContext((LogContextConfiguration) configurator);
        } else {
            // Remove all the handlers and close them as well as reset the loggers
            final List<String> loggerNames = Collections.list(embeddedLogContext.getLoggerNames());
            for (String name : loggerNames) {
                final Logger logger = embeddedLogContext.getLoggerIfExists(name);
                if (logger != null) {
                    final Handler[] handlers = logger.clearHandlers();
                    if (handlers != null) {
                        for (Handler handler : handlers) {
                            handler.close();
                        }
                    }
                    logger.setFilter(null);
                    logger.setUseParentFilters(false);
                    logger.setUseParentHandlers(true);
                    logger.setLevel(Level.INFO);
                }
            }
        }
    }
678453
function removeOrphans(manifest, logName) {
    var originalIndexes = Object.keys(manifest.indexes);

    // hashtable for number of time a bundle was visited
    var visitedIndexes = originalIndexes.reduce(function(indexes, file) {
        indexes[file] = false;
        return indexes;
    }, {});

    // recursive function to visit bundle and it's deps
    function visitBundle(file) {
        if (visitedIndexes[file]) {
            return;
        }
        visitedIndexes[file] = true;
        // walk deps
        var bundle = manifest.bundles[manifest.indexes[file]];
        bundle.data.forEach(function(module) {
            Object.keys(module.deps).forEach(function(key) {
                var value = module.deps[key];
                if (visitedIndexes.hasOwnProperty(value)) {
                    visitBundle(value);
                }
            });
        });
    }

    // start visiting from entries and exposed
    originalIndexes.forEach(function(file) {
        var bundle = manifest.bundles[manifest.indexes[file]];
        if (bundle.expose || bundle.entry) {
            visitBundle(file);
        }
    });

    filterFilesFromManifest(manifest, function(file) {
        return visitedIndexes.hasOwnProperty(file) && visitedIndexes[file];
    }, logName);
}
287524
def discard_logcat_logs(self):
        """"""
        if self.driver_wrapper.is_android_test():
            try:
                self.driver_wrapper.driver.get_log('logcat')
            except Exception:
                pass
1090039
function clearLog() : void
    {
        @unlink($this -> errLogger -> getFile());
        @unlink($this -> logger -> getFile());
        @unlink($this -> errLogger -> getFile().'.shell');
        @unlink($this -> logger -> getFile().'.shell');
    }
312298
function off(type, handler) {
                if (all[type]) {
                    all[type].splice(all[type].indexOf(handler) >>> 0, 1);
                }
            }
310213
async function removeExpiredLogFiles(logdir, maxDays, logger) {
  // ignore not exists dir
  const exists = await fs.exists(logdir);
  if (!exists) return;

  const files = await fs.readdir(logdir);
  const expriedDate = moment().subtract(maxDays, 'days').startOf('date');
  const names = files.filter(file => {
    const name = path.extname(file).substring(1);
    if (!/^\d{4}\-\d{2}\-\d{2}/.test(name)) {
      return false;
    }
    const date = moment(name, 'YYYY-MM-DD').startOf('date');
    if (!date.isValid()) {
      return false;
    }
    return date.isBefore(expriedDate);
  });
  if (names.length === 0) {
    return;
  }

  logger.info(`[egg-logrotator] start remove ${logdir} files: ${names.join(', ')}`);

  await Promise.all(names.map(name => {
    const logfile = path.join(logdir, name);
    return fs.unlink(logfile)
      .catch(err => {
        err.message = `[egg-logrotator] remove logfile ${logfile} error, ${err.message}`;
        logger.error(err);
      });
  }));
}
1354551
private function cleanTarget(): void
    {
        foreach ($this->targetDictionary->keys() as $key) {
            if (!$this->sourceDictionary->has($key) || $this->sourceDictionary->get($key)->isSourceEmpty()) {
                $this->logger->log($this->logLevel, 'Removing obsolete {key}.', ['key' => $key]);
                if ($this->dryRun) {
                    continue;
                }

                $this->targetDictionary->remove($key);
            }
        }
    }
899597
public function removeAssets()
    {
        // Base implementation does only know about log file.
        if ($this->logFile) {
            if (file_exists($this->logFile)) {
                unlink($this->logFile);
            }
            $this->logFile = null;
            $this->file->remove('log');
        }
    }
336191
def delete_eventtype(self, test_type_str=None):
        """"""
        if test_type_str:
            answer = test_type_str, True
        else:
            answer = QInputDialog.getText(self, 'Delete Event Type',
                                          'Enter event\'s name to delete')
        if answer[1]:
            self.annot.remove_event_type(answer[0])
            self.display_eventtype()
            self.update_annotations()
1270619
function removeThis()
    {
        $workflowParameters = $this->attribute( 'parameter_list' );
        $cleanupList = array();

        $db = eZDB::instance();
        $db->begin();
        if ( isset( $workflowParameters['cleanup_list'] ) && is_array( $workflowParameters['cleanup_list'] ) )
        {
            $cleanupList = $workflowParameters['cleanup_list'];
            foreach ( $cleanupList as $workflowEventID )
            {
                $workflowEvent = eZWorkflowEvent::fetch( $workflowEventID );
                $workflowType = $workflowEvent->eventType();
                $workflowType->cleanup( $this, eZWorkflowEvent::fetch( $workflowEventID ) );
            }
        }
        eZPersistentObject::removeObject( eZWorkflowProcess::definition(), array( 'id' => $this->attribute( 'id' ) ) );
        $db->commit();
    }
75872
def remove_all_handlers(logger=None):
    
    if not isinstance(logger, logging.Logger):
        logger = logging.getLogger(logger)

    remove_file_handlers(logger)
    logger.handlers = []