uploads a log to a server using the method and gui specifed
        in self.pcfg
        singleton mode can be disabled so a new version can be restarted whille uploading oges
        on typicallin in the case of uploadnig after a crash or sys exit
        set self.cfg log_upload_interface to gui/cli/or background

def upload_logs(self, release_singleton=True):
        '''
        uploads a log to a server using the method and gui specifed
        in self.pcfg
        singleton mode can be disabled so a new version can be restarted whille uploading oges
        on typicallin in the case of uploadnig after a crash or sys exit
        set self.cfg log_upload_interface to gui/cli/or background
        '''
        if release_singleton:
            self.release_singleton()

        def _upload():
            for log in self.get_logs():
                new_name = self._uniquename(log)
                self._upload(log, new_name)
                # Todo: keep log around for a few days
                self.delete_log(log)

        if self.pcfg['log_server_interface'] == 'gui':
            raise NotImplementedError
            threading.Thread(target=threadme)
            gui_uploader(threadme)
        elif self.pcfg['log_server_interface'] == 'cli':
            raise NotImplementedError
        elif self.pcfg['log_server_interface'] == 'background':
            _upload()