Writing custom output to logs

(Kishor Baindoor) #1


I want to know if there is anyway to write custom message along with standard execution output to Ataccama log file from Plan or component.

More detail: We want to write custom message such as business rule detail, calculated values and other details to log file which will shown up in console. This will be helpful for user to get understanding about what is happening in plan/component by looking at the console or log file.


Well you can try Async Writer step with Logger target.
Here is extract from documentation.

<component class="com.ataccama.dqc.tasks.experimental.asyncwriter.service.AsyncWriterComponent" name="..." latencyTime="..." queueSize="...">
	<target class="..."/>
This component defines parameters for connecting and sending records from AsyncWriter step. The parameters are: 
name Name of the service. Used in serviceName property of AsyncWriter step  
queueSize Maximal size of record queue. Default: 100.  
latencyTime Maximal time the records read from queue are not flushed into target. Default: 60.  
target Specification of target into which records will be submitted.  
There are two types of target for now. First, plan target enables submitting of records into another processing configured via component plan. Second target simply writes records to log (intended mainly for debugging). 
<target class="com.ataccama.dqc.tasks.experimental.asyncwriter.service.PlanTarget" fileName="aw_component.comp" />
<target class="com.ataccama.dqc.tasks.experimental.asyncwriter.service.LoggerTarget" />