/** * Discard all the lines for the specified log channel id AND all the children. * * @param parentLogChannelId the parent log channel id to be removed along with all its children. */ public static void discardLines( String parentLogChannelId, boolean includeGeneralMessages ) { KettleLogStore.discardLines( parentLogChannelId, includeGeneralMessages ); } }
public void widgetDisposed( DisposeEvent event ) { if ( transGraph.trans != null ) { KettleLogStore.discardLines( transGraph.trans.getLogChannelId(), true ); } } } );
public void widgetDisposed( DisposeEvent event ) { if ( jobGraph.job != null ) { KettleLogStore.discardLines( jobGraph.job.getLogChannelId(), true ); } } } );
@GET @Path( "/remove/{id : .+}" ) public Response removeJob( @PathParam( "id" ) String id ) { Job job = CarteResource.getJob( id ); CarteObjectEntry entry = CarteResource.getCarteObjectEntry( id ); KettleLogStore.discardLines( job.getLogChannelId(), true ); CarteSingleton.getInstance().getJobMap().removeJob( entry ); return Response.ok().build(); }
@GET @Path( "/remove/{id : .+}" ) public Response removeTransformation( @PathParam( "id" ) String id ) { Trans trans = CarteResource.getTransformation( id ); CarteObjectEntry entry = CarteResource.getCarteObjectEntry( id ); KettleLogStore.discardLines( trans.getLogChannelId(), true ); CarteSingleton.getInstance().getTransformationMap().removeTransformation( entry ); return Response.ok().build(); }
@VisibleForTesting void discardLogLines( JobExecutorData data ) { // Keep the strain on the logging back-end conservative. // TODO: make this optional/user-defined later if ( data.executorJob != null ) { KettleLogStore.discardLines( data.executorJob.getLogChannelId(), false ); LoggingRegistry.getInstance().removeIncludingChildren( data.executorJob.getLogChannelId() ); } }
@GET @Path( "/start/{id : .+}" ) @Produces( { MediaType.APPLICATION_JSON } ) public TransformationStatus startTransformation( @PathParam( "id" ) String id ) { Trans trans = CarteResource.getTransformation( id ); try { // Discard old log lines from old transformation runs // KettleLogStore.discardLines( trans.getLogChannelId(), true ); String carteObjectId = UUID.randomUUID().toString(); SimpleLoggingObject servletLoggingObject = new SimpleLoggingObject( getClass().getName(), LoggingObjectType.CARTE, null ); servletLoggingObject.setContainerObjectId( carteObjectId ); servletLoggingObject.setLogLevel( trans.getLogLevel() ); trans.setParent( servletLoggingObject ); trans.execute( null ); } catch ( KettleException e ) { e.printStackTrace(); } return getTransformationStatus( id ); }
@VisibleForTesting void discardLogLines( TransExecutorData transExecutorData ) { // Keep the strain on the logging back-end conservative. // TODO: make this optional/user-defined later Trans executorTrans = transExecutorData.getExecutorTrans(); if ( executorTrans != null ) { KettleLogStore.discardLines( executorTrans.getLogChannelId(), false ); LoggingRegistry.getInstance().removeIncludingChildren( executorTrans.getLogChannelId() ); } }
KettleLogStore.discardLines( job.getLogChannelId(), true ); getJobMap().removeJob( entry );
KettleLogStore.discardLines( trans.getLogChannelId(), true ); getTransformationMap().removeTransformation( entry );
KettleLogStore.discardLines( trans.getLogChannelId(), true );
KettleLogStore.discardLines( job.getLogChannelId(), true );
KettleLogStore.discardLines( trans.getLogChannelId(), false );
KettleLogStore.discardLines( job.getLogChannelId(), true );
buffer.append( log ); KettleLogStore.discardLines( trans.getLogChannelId(), false ); LoggingRegistry.getInstance().removeIncludingChildren( trans.getLogChannelId() );
KettleLogStore.discardLines( trans.getLogChannelId(), false ); LoggingRegistry.getInstance().removeIncludingChildren( trans.getLogChannelId() );
KettleLogStore.discardLines( trans.getLogChannelId(), true );
KettleLogStore.discardLines( job.getLogChannelId(), true );
} else { KettleLogStore.discardLines( trans.getLogChannelId(), true );