/** * Log error. * * @param message the message * @param e the e */ public void logError( String message, Throwable e ) { log.logError( message, e ); }
/** * Checks if is basic. * * @return true, if is basic */ public boolean isBasic() { return log.isBasic(); }
/** * Log basic. * * @param message the message */ public void logBasic( String message ) { log.logBasic( message ); }
/** * Could in theory be used to figure out the format of the date/time except that I'd need time on the server to see if * this actually works that way. For now, we ignore the locale and try to figure out the date format ourselves. */ @Override public void setLocale( Locale arg0 ) { // if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "MVSFileParser.DEBUG.Ignore.Locale" ) ); } }
/** * Sets the parent job. * * @param parentJob * The parentJob to set. */ public void setParentJob( Job parentJob ) { this.logLevel = parentJob.getLogLevel(); this.log.setLogLevel( logLevel ); this.containerObjectId = log.getContainerObjectId(); this.parentJob = parentJob; }
public final void connect( String username, String password ) throws KettleException { Hashtable<String, String> env = new Hashtable<String, String>(); setupEnvironment( env, username, password ); try { /* Establish LDAP association */ doConnect( username, password ); if ( log.isBasic() ) { log.logBasic( BaseMessages.getString( PKG, "LDAPInput.Log.ConnectedToServer", hostname, Const.NVL( username, "" ) ) ); } if ( log.isDetailed() ) { log.logDetailed( BaseMessages.getString( PKG, "LDAPInput.ClassUsed.Message", ctx.getClass().getName() ) ); } } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "LDAPinput.Exception.ErrorConnecting", e .getMessage() ), e ); } }
public void close() throws KettleException { if ( ctx != null ) { try { ctx.close(); if ( log.isBasic() ) { log.logBasic( BaseMessages.getString( PKG, "LDAPInput.log.Disconnection.Done" ) ); } } catch ( Exception e ) { log.logError( BaseMessages.getString( PKG, "LDAPInput.Exception.ErrorDisconecting", e.toString() ) ); log.logError( Const.getStackTracker( e ) ); } finally { ctx = null; } } } }
@Override public RowSet parse( InputStream in ) throws KettleException { readInput( in ); List<List<?>> results = evalCombinedResult(); int len = results.isEmpty() ? 0 : results.get( 0 ).size(); if ( log.isDetailed() ) { log.logDetailed( BaseMessages.getString( PKG, "JsonInput.Log.NrRecords", len ) ); } if ( len == 0 ) { return getEmptyResponse(); } return new TransposedRowSet( results ); }
/** * Checks if is detailed. * * @return true, if is detailed */ public boolean isDetailed() { return log.isDetailed(); }
/** * Log debug. * * @param message the message */ public void logDebug( String message ) { log.logDebug( message ); }
/** * Log detailed. * * @param message the message */ public void logDetailed( String message ) { log.logDetailed( message ); }
/** * Checks if is debug. * * @return true, if is debug */ public boolean isDebug() { return log.isDebug(); }
public PurRepositoryConnector( PurRepository purRepository, PurRepositoryMeta repositoryMeta, RootRef rootRef ) { log = new LogChannel( this.getClass().getSimpleName() ); if ( purRepository != null && purRepository.getLog() != null ) { log.setLogLevel( purRepository.getLog().getLogLevel() ); } this.purRepository = purRepository; this.repositoryMeta = repositoryMeta; this.rootRef = rootRef; }
/** * Checks if the logging level is rowlevel. * * @return true if the logging level is rowlevel, false otherwise */ public boolean isRowlevel() { return log.isRowLevel(); }
/** * Sets the log level. * * @param logLevel the new log level */ public void setLogLevel( LogLevel logLevel ) { this.logLevel = logLevel; log.setLogLevel( logLevel ); }
public String sendXML( String xml, String service ) throws Exception { HttpPost method = buildSendXMLMethod( xml.getBytes( Const.XML_ENCODING ), service ); try { return executeAuth( method ); } finally { // Release current connection to the connection pool once you are done method.releaseConnection(); if ( log.isDetailed() ) { log.logDetailed( BaseMessages.getString( PKG, "SlaveServer.DETAILED_SentXmlToService", service, environmentSubstitute( hostname ) ) ); } } }
/** * Checks if the logging level is detailed. * * @return true if the logging level is detailed, false otherwise */ public boolean isDetailed() { return log.isDetailed(); }