@Override public void logWarn( String message, Throwable throwable ) { getLogger().logWarn( message, throwable ); }
@Override protected ElementGraph prepareForMatch( ProcessLogger processLogger, Transformed<ElementGraph> transformed, ElementGraph graph ) { if( graphTransformer == null ) return graph; if( processLogger.isDebugEnabled() ) processLogger.logDebug( "transforming with: {}", graphTransformer.getClass().getSimpleName() ); Transformed child = graphTransformer.transform( transformed.getPlannerContext(), graph ); transformed.addChildTransform( child ); return child.getEndGraph(); } }
@Override public final boolean isInfoEnabled() { return getLogger().isInfoEnabled(); }
public void writeFinal( String fileName, RuleResult ruleResult ) { Path path = getPlanTracePath(); if( path == null ) return; Path filePath = path.resolve( String.format( "%s-%s.txt", fileName, ruleResult.getRegistry().getName() ) ); File file = filePath.toFile(); processLogger.logInfo( "writing final registry: {}", file ); try( PrintWriter writer = new PrintWriter( file ) ) { writer.println( "filename names winning rule registry" ); } catch( IOException exception ) { processLogger.logError( "could not write final registry", exception ); } }
getFlowLogger().logWarn( "planner cancelling long running registries past timeout period: {}, see RuleRegistrySet#setPlannerTimeoutSec() to change timeout", formatDurationFromMillis( registrySet.getPlannerTimeoutSec() * 1000 ) ); else getFlowLogger().logInfo( "first registry completed, planner cancelling remaining running registries: {}, successful: {}", futures.size(), success.size() ); getFlowLogger().logError( "planner thread interrupted", exception );
@Override public void logInfo( String message, Object... arguments ) { getLogger().logInfo( message, arguments ); }
processLogger.logInfo( "!!! transform recursion ending, reached depth: {}", currentDepth ); return graph; if( processLogger.isDebugEnabled() ) processLogger.logDebug( "preparing match within: {}", this.getClass().getSimpleName() ); if( processLogger.isDebugEnabled() ) processLogger.logDebug( "completed match within: {}, with result: {}", this.getClass().getSimpleName(), prepared != null ); if( processLogger.isDebugEnabled() ) processLogger.logDebug( "performing match within: {}, using recursion: {}", this.getClass().getSimpleName(), !findAllPrimaries ); match = finder.findFirstMatch( transformed.getPlannerContext(), prepared, exclusions ); if( processLogger.isDebugEnabled() ) processLogger.logDebug( "completed match within: {}", this.getClass().getSimpleName() ); if( processLogger.isDebugEnabled() ) processLogger.logDebug( "performing transform in place within: {}", this.getClass().getSimpleName() ); if( processLogger.isDebugEnabled() ) processLogger.logDebug( "completed transform in place within: {}, with result: {}", this.getClass().getSimpleName(), transformResult );
@Override public void logDebug( String message, Object... arguments ) { getLogger().logDebug( message, arguments ); }
@Override public void logError( String message, Object... arguments ) { getLogger().logError( message, arguments ); }
@Override public final boolean isDebugEnabled() { return ( getLogger() ).isDebugEnabled(); }
@Override public void logInfo( String message, Object... arguments ) { getLogger().logInfo( message, arguments ); }
@Override public void logDebug( String message, Object... arguments ) { getLogger().logDebug( message, arguments ); }
public void writeStats( PlannerContext plannerContext, RuleResult ruleResult ) { Path path = getPlanStatsPath(); if( path == null ) return; File file = path.resolve( String.format( "planner-stats-%s-%s.txt", ruleResult.getRegistry().getName(), ruleResult.getResultStatus() ) ).toFile(); processLogger.logInfo( "writing planner stats to: {}", file ); file.getParentFile().mkdirs(); try( PrintWriter writer = new PrintWriter( file ) ) { Flow flow = plannerContext.getFlow(); Map<Object, Object> configAsProperties = flow.getConfigAsProperties(); writer.format( "cascading version: %s, build: %s\n", emptyOrValue( Version.getReleaseFull() ), emptyOrValue( Version.getReleaseBuild() ) ); writer.format( "application id: %s\n", emptyOrValue( AppProps.getApplicationID( configAsProperties ) ) ); writer.format( "application name: %s\n", emptyOrValue( AppProps.getApplicationName( configAsProperties ) ) ); writer.format( "application version: %s\n", emptyOrValue( AppProps.getApplicationVersion( configAsProperties ) ) ); writer.format( "platform: %s\n", emptyOrValue( flow.getPlatformInfo() ) ); writer.format( "frameworks: %s\n", emptyOrValue( AppProps.getApplicationFrameworks( configAsProperties ) ) ); writer.println(); ruleResult.writeStats( writer ); } catch( IOException exception ) { processLogger.logError( "could not write stats", exception ); } }
@Override public void logError( String message, Throwable throwable ) { getLogger().logError( message, throwable ); } }
@Override public boolean isDebugEnabled() { return getLogger().isDebugEnabled(); }
@Override public void logWarn( String message ) { getLogger().logWarn( message ); }
public void writeTracePlan( String registryName, String fileName, FlowStepGraph stepGraph ) { Path path = getPlanTracePath(); if( path == null ) return; if( stepGraph == null ) { processLogger.logInfo( "cannot write step plan, stepGraph is null" ); return; } if( registryName != null ) path = path.resolve( registryName ); Path filePath = path.resolve( String.format( "%s.dot", fileName ) ); File file = filePath.toFile(); processLogger.logInfo( "writing trace step plan: {}", file ); stepGraph.writeDOT( file.toString() ); }
protected void logDebug( String message, Object... arguments ) { getProcessLogger().logDebug( getPrefix() + message, arguments ); }
@Override public void logError( String message, Throwable throwable ) { getLogger().logError( message, throwable ); }