public LogWriterObject( String subject, LoggingObjectInterface parent, LogLevel logLevel ) { this.subject = subject; this.parent = parent; this.logLevel = logLevel; this.writerLog = new LogChannel( this, parent ); this.containerObjectId = writerLog.getContainerObjectId(); }
/** * 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 Job( Repository repository, JobMeta jobMeta, LoggingObjectInterface parentLogging ) { this.rep = repository; this.jobMeta = jobMeta; this.containerObjectId = jobMeta.getContainerObjectId(); this.parentLoggingObject = parentLogging; init(); jobTracker = new JobTracker( jobMeta ); this.log = new LogChannel( this, parentLogging ); this.logLevel = log.getLogLevel(); if ( this.containerObjectId == null ) { this.containerObjectId = log.getContainerObjectId(); } }
/** * Construct a new Database Connection * * @param databaseMeta The Database Connection Info to construct the connection with. * @deprecated Please specify the parent object so that we can see which object is initiating a database connection */ @Deprecated public Database( DatabaseMeta databaseMeta ) { this.parentLoggingObject = null; this.databaseMeta = databaseMeta; shareVariablesWith( databaseMeta ); // In this case we don't have the parent object, so we don't know which // object makes the connection. // We also don't know what log level to attach to it, so we have to stick to // the default // As such, this constructor is @deprecated. // log = new LogChannel( this ); logLevel = log.getLogLevel(); containerObjectId = log.getContainerObjectId(); pstmt = null; rowMeta = null; dbmd = null; rowlimit = 0; written = 0; opened = copy = 0; if ( log.isDetailed() ) { log.logDetailed( "New database connection defined" ); } }
/** * Sets the parent logging object. * * @param parent the new parent */ public void setParent( LoggingObjectInterface parent ) { this.parent = parent; this.log = new LogChannel( this, parent ); this.logLevel = log.getLogLevel(); if ( this.containerObjectId == null ) { this.containerObjectId = log.getContainerObjectId(); } if ( log.isDetailed() ) { log.logDetailed( BaseMessages.getString( PKG, "Trans.Log.TransformationIsPreloaded" ) ); } if ( log.isDebug() ) { log.logDebug( BaseMessages.getString( PKG, "Trans.Log.NumberOfStepsToRun", String.valueOf( transMeta.nrSteps() ), String.valueOf( transMeta.nrTransHops() ) ) ); } }
/** * Construct a new Database Connection * * @param databaseMeta The Database Connection Info to construct the connection with. */ public Database( LoggingObjectInterface parentObject, DatabaseMeta databaseMeta ) { this.parentLoggingObject = parentObject; this.databaseMeta = databaseMeta; shareVariablesWith( databaseMeta ); if ( parentObject instanceof VariableSpace ) { shareVariablesWith( (VariableSpace) parentObject ); } log = new LogChannel( this, parentObject ); this.containerObjectId = log.getContainerObjectId(); this.logLevel = log.getLogLevel(); if ( parentObject != null ) { log.setGatheringMetrics( parentObject.isGatheringMetrics() ); } pstmt = null; rowMeta = null; dbmd = null; rowlimit = 0; written = 0; opened = copy = 0; if ( log.isDetailed() ) { log.logDetailed( "New database connection defined" ); } }