Forceful cleanup the logs
7250
@JmxOperation(description = "Forcefully invoke the log cleaning")
    public void cleanLogs() {
        synchronized(lock) {
            try {
                for(Environment environment: environments.values()) {
                    environment.cleanLog();
                }
            } catch(DatabaseException e) {
                throw new VoldemortException(e);
            }
        }
    }
526321
private function clearLogs()
    {
        foreach ($this->logger->getHandlers() as $handler) {
            if ($handler instanceof FingersCrossedHandler) {
                $handler->clear();
            }
        }
    }
1041929
public static function clear(): void
    {
        $log_file =
            Plugin::dataPath().
            DIRECTORY_SEPARATOR."plugin.log";

        if(!file_exists(dirname($log_file)))
            mkdir(dirname($log_file));

        file_put_contents(
            $log_file,
            "",
            LOCK_EX
        );
    }
31043
def cleanup_logger(self):
        
        self.log_handler.close()
        self.log.removeHandler(self.log_handler)
252655
def _cleanup(self):
        """"""
        self._expkg = None
        self._extmp = None
        self._flag_e = True
        self._ifile.close()
578950
def delete_log(self, log):
        ''''''
        if os.path.splitext(log)[-1] != '.log':
            raise Exception('File without .log was passed in for deletoin')
        with suppress(Exception):
            os.remove(log)
185280
def _teardown_log_prefix(self):
        """"""
        self._logger_console_fmtter.prefix = ''
        self._logger_console_fmtter.plugin_id = ''
        self._logger_file_fmtter.prefix = ' '
        self._logger_file_fmtter.plugin_id = ''
34655
def cleanup(self):
        """"""
        if self.image:
            try:
                self.image.close()
            except Exception:
                pass
        if (self.outtmp is not None):
            try:
                os.unlink(self.outtmp)
            except OSError as e:
                self.logger.warning("Failed to cleanup tmp output file %s"
                                    % (self.outtmp))
991592
def cleanup(output_root):
    """"""
    if os.path.exists(output_root):
        if os.path.isdir(output_root):
            rmtree(output_root)
        else:
            os.remove(output_root)
1080741
def cleanup(self):
        """"""
        self.parser = None
        self.request = None
        self.url = None
        self.headers = None
        self._request_handler_task = None
        self._request_stream_task = None
        self._total_request_size = 0
        self._is_stream_handler = False
602904
def cleanup(self):
        
        pb = self._get_ansible_playbook(self.playbooks.cleanup)
        pb.execute()
86061
def cleanup(context):
    
    for name in 'work_dir', 'artifact_dir', 'task_log_dir':
        path = context.config[name]
        if os.path.exists(path):
            log.debug("rm({})".format(path))
            rm(path)
        makedirs(path)
1090039
function clearLog() : void
    {
        @unlink($this -> errLogger -> getFile());
        @unlink($this -> logger -> getFile());
        @unlink($this -> errLogger -> getFile().'.shell');
        @unlink($this -> logger -> getFile().'.shell');
    }
1000659
def sanitize_logger (self):
        """"""
        if not self['output']:
            log.warn(LOG_CHECK, _("activating text logger output."))
            self['output'] = 'text'
        self['logger'] = self.logger_new(self['output'])
50977
static function cleanup()
    {
        $ini = eZINI::instance();
        $db = eZDB::instance();
        $timeFrame = 1;
        if ( $ini->hasVariable( 'TipAFriend', 'TimeFrame' ) )
            $timeFrame = $ini->variable( 'TipAFriend', 'TimeFrame' );
        $time = time() - $timeFrame * 3600;

        $db->query( "DELETE FROM eztipafriend_request
                      WHERE created < $time " );
    }
1082357
private void silenceHiveLoggers() {
    List<String> loggers = ImmutableList.of("org.apache.hadoop.hive", "org.apache.hive", "hive.ql.parse");
    for (String name : loggers) {
      Logger logger = Logger.getLogger(name);
      if (logger != null) {
        logger.setLevel(Level.WARN);
      }
    }
  }
650739
def reduce(self, show_noisy=False):
        
        if not show_noisy:
            for log in self.quiet_logs:
                yield log['raw'].strip()
        else:
            for log in self.noisy_logs:
                yield log['raw'].strip()