/** * Checks if is debug. * * @return true, if is debug */ public boolean isDebug() { return log.isDebug(); }
/** * Checks if the logging level is debug. * * @return true if the logging level is debug, false otherwise */ public boolean isDebug() { return log.isDebug(); }
@Override public boolean isDebug() { return log.isDebug(); }
/** * Checks if is debug. * * @return true, if is debug */ public boolean isDebug() { return getLog().isDebug(); }
HttpPost buildSendXMLMethod( byte[] content, String service ) throws Exception { // Prepare HTTP put // String urlString = constructUrl( service ); if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "SlaveServer.DEBUG_ConnectingTo", urlString ) ); } HttpPost postMethod = new HttpPost( urlString ); // Request content will be retrieved directly from the input stream // HttpEntity entity = new ByteArrayEntity( content ); postMethod.setEntity( entity ); postMethod.addHeader( new BasicHeader( "Content-Type", "text/xml;charset=" + Const.XML_ENCODING ) ); return postMethod; }
protected void writeRowToMonetDB( RowMetaInterface rowMeta, Object[] r ) throws KettleException { if ( data.bufferIndex == data.bufferSize || log.isDebug() ) { writeBufferToMonetDB(); } addRowToBuffer( rowMeta, r ); }
/** * 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" ) ); } }
private String getResponse( HttpUriRequest method, HttpResponse httpResponse ) throws IOException, KettleException { StatusLine statusLine = httpResponse.getStatusLine(); int statusCode = statusLine.getStatusCode(); // The status code if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "SlaveServer.DEBUG_ResponseStatus", Integer.toString( statusCode ) ) ); } String responseBody = getResponseBodyAsString( httpResponse.getEntity().getContent() ); if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "SlaveServer.DEBUG_ResponseBody", responseBody ) ); } // throw if not ok handleStatus( method, statusLine, statusCode ); return responseBody; }
/** * Delete temporary file. * * @throws KettleException */ private void deleteTempFile() { if ( this.tmpFile != null ) { if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "GPG.DeletingTempFile", getTempFileName() ) ); } this.tmpFile.delete(); } }
public List<RepositoryElementMetaInterface> getTransformationObjects( ObjectId id_directory, boolean includeDeleted ) throws KettleException { List<RepositoryElementMetaInterface> objects = getRepositoryObjects( quoteTable( KettleDatabaseRepository.TABLE_R_TRANSFORMATION ), RepositoryObjectType.TRANSFORMATION, id_directory ); if ( ( log != null ) && log.isDebug() && objects.size() > 0 ) { log.logDebug( objects.get( 0 ).getRepositoryDirectory().getPath() ); } return objects; }
@Override protected void service( HttpServletRequest req, HttpServletResponse resp ) throws IOException { if ( isJettyMode() && !req.getContextPath().endsWith( getContextPath() ) ) { return; } if ( log.isDebug() ) { logDebug( getService() ); } handleRequest( new CarteRequestImpl( req, resp ) ); }
private void editHop( TransHopMeta transHopMeta ) { String name = transHopMeta.toString(); if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "TransGraph.Logging.EditingHop" ) + name ); } spoon.editHop( transMeta, transHopMeta ); }
@Override public void dispose( StepMetaInterface smi, StepDataInterface sdi ) { meta = (SSHMeta) smi; data = (SSHData) sdi; if ( data.conn != null ) { data.conn.close(); if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "SSH.Log.ConnectionClosed" ) ); } } super.dispose( smi, sdi ); } }
protected void logDebug( final String messageKey ) { if ( getLog().isDebug() ) { getLog().logDebug( BaseMessages.getString( getPkgClazz(), messageKey ) ); } }
protected void logDebug( final String messageKey, String... messageTokens ) { if ( getLog().isDebug() ) { getLog().logDebug( BaseMessages.getString( getPkgClazz(), messageKey, messageTokens ) ); } }
private void addFileToResultFilenames( String fileaddentry, LogChannelInterface log, Result result, Job parentJob ) { try { ResultFile resultFile = new ResultFile( ResultFile.FILE_TYPE_GENERAL, KettleVFS.getFileObject( fileaddentry, this ), parentJob .getJobname(), toString() ); result.getResultFiles().put( resultFile.getFile().toString(), resultFile ); if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "JobExportRepository.Log.FileAddedToResultFilesName", fileaddentry ) ); } } catch ( Exception e ) { log.logError( BaseMessages.getString( PKG, "JobExportRepository.Error.AddingToFilenameResult" ), fileaddentry + "" + e.getMessage() ); } }
@Test public void testService() throws Exception { when( req.getContextPath() ).thenReturn( "/Path" ); when( baseCartePlugin.getContextPath() ).thenReturn( "/Path" ); when( log.isDebug() ).thenReturn( true ); baseCartePlugin.service( req, resp ); verify( log ).logDebug( baseCartePlugin.getService() ); verify( baseCartePlugin ).handleRequest( carteReqCaptor.capture() ); CarteRequestHandler.CarteRequest carteRequest = carteReqCaptor.getValue(); testCarteRequest( carteRequest ); testCarteResponse( carteRequest.respond( 200 ) ); }
private void addFileToResultFilenames( String fileaddentry, Result result, Job parentJob ) { try { ResultFile resultFile = new ResultFile( ResultFile.FILE_TYPE_GENERAL, KettleVFS.getFileObject( fileaddentry, this ), parentJob .getJobname(), toString() ); result.getResultFiles().put( resultFile.getFile().toString(), resultFile ); if ( log.isDebug() ) { logDebug( " ------ " ); logDebug( BaseMessages.getString( PKG, "JobMoveFiles.Log.FileAddedToResultFilesName", fileaddentry ) ); } } catch ( Exception e ) { log.logError( BaseMessages.getString( PKG, "JobMoveFiles.Error.AddingToFilenameResult" ), fileaddentry + "" + e.getMessage() ); } }
public StepMeta newStep( TransMeta transMeta, boolean openit, boolean rename ) { if ( transMeta == null ) { return null; } TreeItem[] ti = selectionTree.getSelection(); StepMeta inf = null; if ( ti.length == 1 ) { String stepType = ti[0].getText(); if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "Spoon.Log.NewStep" ) + stepType ); // "New step: " } inf = newStep( transMeta, stepType, stepType, openit, rename ); } return inf; }
private Object getValue( ValueMetaInterface targetMeta, ValueMetaInterface strConvertMeta, Object value ) throws KettleValueException { if ( targetMeta.isNumeric() ) { try { // attempt direct conversion return targetMeta.getNativeDataType( value ); } catch ( KettleValueException e ) { if ( log.isDebug() ) { log.logDebug( e.getLocalizedMessage(), e ); } } } // convert from string String strValue = getStringValue( value ); return targetMeta.convertDataFromString( strValue, strConvertMeta, null, null, targetMeta.getTrimType() ); }