/** {@inheritDoc} */ public void error( Throwable error ) { for ( ScmLogger logger : listeners ) { logger.error( error ); } }
/** {@inheritDoc} */ public void error( String content ) { for ( ScmLogger logger : listeners ) { logger.error( content ); } }
private void logErrorMessage( String message ) { if ( fLogger != null ) { fLogger.error( message ); } }
/** {@inheritDoc} */ public void error( String content, Throwable error ) { for ( ScmLogger logger : listeners ) { logger.error( content, error ); } }
/** {@inheritDoc} */ public void error( String content, Throwable error ) { for ( ScmLogger logger : listeners ) { logger.error( content, error ); } }
/** {@inheritDoc} */ public void error( String content ) { for ( ScmLogger logger : listeners ) { logger.error( content ); } }
/** {@inheritDoc} */ public void error( Throwable error ) { for ( ScmLogger logger : listeners ) { logger.error( error ); } }
private void logErrorMessage( String message ) { if ( fLogger != null ) { fLogger.error( message ); } }
protected Date parseDateTime( String dateTimeStr ) { try { return dateFormat.parse( dateTimeStr ); } catch ( ParseException e ) { getLogger().error( "skip ParseException: " + e.getMessage() + " during parsing date " + dateTimeStr, e ); return null; } }
protected Date parseDateTime( String dateTimeStr ) { try { return dateFormat.parse( dateTimeStr ); } catch ( ParseException e ) { getLogger().error( "skip ParseException: " + e.getMessage() + " during parsing date " + dateTimeStr, e ); return null; } }
private void processDirectory( String line, int pos ) { String dirPath = line.substring( pos + DIR_MARKER.length(), line.length() - 1 ).replace( '\\', '/' ); try { this.currentDir = StarteamCommandLineUtils.getRelativeChildDirectory( this.workingDirectory, dirPath ); } catch ( IllegalStateException e ) { String error = "Working and checkout directories are not on the same tree"; if ( logger.isErrorEnabled() ) { logger.error( error ); logger.error( "Working directory: " + workingDirectory ); logger.error( "Checked out directory: " + dirPath ); } throw new IllegalStateException( error ); } }
private void processDirectory( String line, int pos ) { String dirPath = line.substring( pos + DIR_MARKER.length(), line.length() - 1 ).replace( '\\', '/' ); try { this.currentDir = StarteamCommandLineUtils.getRelativeChildDirectory( this.workingDirectory, dirPath ); } catch ( IllegalStateException e ) { String error = "Working and checkout directories are not on the same tree"; if ( logger.isErrorEnabled() ) { logger.error( error ); logger.error( "Working directory: " + workingDirectory ); logger.error( "Checked out directory: " + dirPath ); } throw new IllegalStateException( error ); } }
private void processDirectory( String line, int pos ) { String dirPath = line.substring( pos + DIR_MARKER.length(), line.length() - 1 ).replace( '\\', '/' ); try { this.currentDir = StarteamCommandLineUtils.getRelativeChildDirectory( this.workingDirectory, dirPath ); } catch ( IllegalStateException e ) { String error = "Working and checkout directories are not on the same tree"; if ( logger.isErrorEnabled() ) { logger.error( error ); logger.error( "Working directory: " + workingDirectory ); logger.error( "Checked out directory: " + dirPath ); } throw new IllegalStateException( error ); } }
private void processDirectory( String line, int pos ) { String dirPath = line.substring( pos + DIR_MARKER.length(), line.length() - 1 ).replace( '\\', '/' ); try { this.currentDir = StarteamCommandLineUtils.getRelativeChildDirectory( this.workingDirectory, dirPath ); } catch ( IllegalStateException e ) { String error = "Working and checkout directories are not on the same tree"; if ( logger.isErrorEnabled() ) { logger.error( error ); logger.error( "Working directory: " + workingDirectory ); logger.error( "Checked out directory: " + dirPath ); } throw new IllegalStateException( error ); } }
private void processDirectory( String line, int pos ) { String dirPath = line.substring( pos + DIR_MARKER.length(), line.length() - 1 ).replace( '\\', '/' ); try { this.currentDir = StarteamCommandLineUtils.getRelativeChildDirectory( this.workingDirectory, dirPath ); } catch ( IllegalStateException e ) { String error = "Working and checkout directories are not on the same tree"; if ( logger.isErrorEnabled() ) { logger.error( error ); logger.error( "Working directory: " + workingDirectory ); logger.error( "Checked out directory: " + dirPath ); } throw new IllegalStateException( error ); } }
private void processDirectory( String line, int pos ) { String dirPath = line.substring( pos + DIR_MARKER.length(), line.length() - 1 ).replace( '\\', '/' ); try { this.currentDir = StarteamCommandLineUtils.getRelativeChildDirectory( this.workingDirectory, dirPath ); } catch ( IllegalStateException e ) { String error = "Working and checkout directories are not on the same tree"; if ( getLogger().isErrorEnabled() ) { getLogger().error( error ); getLogger().error( "Working directory: " + workingDirectory ); getLogger().error( "Checked out directory: " + dirPath ); } throw new IllegalStateException( error ); } }
private void processDirectory( String line, int pos ) { String dirPath = line.substring( pos + DIR_MARKER.length(), line.length() - 1 ).replace( '\\', '/' ); try { this.currentDir = StarteamCommandLineUtils.getRelativeChildDirectory( this.workingDirectory, dirPath ); } catch ( IllegalStateException e ) { String error = "Working and checkout directories are not on the same tree"; if ( getLogger().isErrorEnabled() ) { getLogger().error( error ); getLogger().error( "Working directory: " + workingDirectory ); getLogger().error( "Checked out directory: " + dirPath ); } throw new IllegalStateException( error ); } }
public XppStreamConsumer( ScmLogger logger ) { super(); this.logger = logger; try { Pipe p = Pipe.open(); SinkChannel sink = p.sink(); SourceChannel source = p.source(); writer = Channels.newWriter( sink, Charset.defaultCharset().name() ); reader = Channels.newReader( source, Charset.defaultCharset().name() ); parser.setInput( reader ); } catch ( Exception e ) { logger.error( "Exception initialising pipe", e ); } }
public XppStreamConsumer( ScmLogger logger ) { super(); this.logger = logger; try { Pipe p = Pipe.open(); SinkChannel sink = p.sink(); SourceChannel source = p.source(); writer = Channels.newWriter( sink, Charset.defaultCharset().name() ); reader = Channels.newReader( source, Charset.defaultCharset().name() ); parser.setInput( reader ); } catch ( Exception e ) { logger.error( "Exception initialising pipe", e ); } }
private AddScmResult executeAddFiles(File workingDirectory, List<File> files) throws ScmException { Commandline cl = createCommandLine(workingDirectory, files); CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer(); CommandLineUtils.StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer(); int exitCode = -1; try { exitCode = GitCommandLineUtils.execute(cl, stdout, stderr, getLogger()); } catch (Throwable t) { getLogger().error("Failed:", t); } if (exitCode != 0) { String msg = stderr.getOutput(); getLogger().info("Add failed:" + msg); return new AddScmResult(cl.toString(), "The git-add command failed.", msg, false); } return null; }