Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

Note: More extensive and up to date information about plug-in development can be found in the PDI SDK in "Embedding and Extending PDI Functionality"

Priority on development

Correctness/Consistency

...

A: All detailed, debug, and rowlevel statements needs to be preceded by the following:

Code Block

if (log.isDetailed())
...

if (log.isDebug())
...

if (log.isRowlevel())
...

...

To get the row in the log, use rowMeta.getString(row)) - but be aware that the rowMeta and row must be correctly defined in case of an error. Otherwise you will get an error when logging an error....

Example:

Code Block

catch(Exception e)
{
    String message = Messages.getString("FilterRows.Exception.UnexpectedErrorFoundInEvaluationFuction");  //$NON-NLS-1$
    logError(message);
    logError(Messages.getString("FilterRows.Log.ErrorOccurredForRow")+rowMeta.getString(row)); //$NON-NLS-1$
    logError(Const.getStackTracker(e));
    throw new KettleException(message, e);
}

...