class Job extends Thread implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface,
    ExecutorInterface, ExtensionDataInterface {

  protected void writeLogTableInformation( JobLogTable jobLogTable, LogStatus status ) throws KettleJobException,
    KettleDatabaseException {
    boolean cleanLogRecords = status.equals( LogStatus.END );
    String tableName = jobLogTable.getActualTableName();
    DatabaseMeta logcon = jobLogTable.getDatabaseMeta();

    Database ldb = createDataBase( logcon );
    ldb.shareVariablesWith( this );
    try {
      ldb.connect();
      ldb.setCommit( logCommitSize );
      ldb.writeLogRecord( jobLogTable, status, this, null );

      if ( cleanLogRecords ) {
        ldb.cleanupLogRecords( jobLogTable );
      }

    } catch ( KettleDatabaseException dbe ) {
      addErrors( 1 );
      throw new KettleJobException( "Unable to end processing by writing log record to table " + tableName, dbe );
    } finally {
      if ( !ldb.isAutoCommit() ) {
        ldb.commitLog( true, jobLogTable );
      }
      ldb.disconnect();
    }
  }

  public  Job( String name, String file, String[] args );
  public  Job( Repository repository, JobMeta jobMeta );
  public  Job( Repository repository, JobMeta jobMeta, LoggingObjectInterface parentLogging );
  public  Job();

}