How to debug database requests on a single table?

I have a problem in a sequential workflow and I need to know what data really travel to the database (specific database table only) on a detailed level. Trace is not enough – it does not give me detailed information and it logs everything, not just requests to a single table.

How to configure ORIGAM logging in order to see both workflow steps executed and what goes on in a single table?

You need configure log4net setting in web.config, add new appender (if you not use current) and new logger.

Look on example below

Add new appender

<appender name="NameOfAppender" type="log4net.Appender.RollingFileAppender">
      <file value="path to log file" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <datePattern value="yyyyMMdd" />
      <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger [%ndc] &lt;%property{auth}> - %message%newline" />
      <!--log only InventoryOperationDetail logger-->
      <filter type="log4net.Filter.StringMatchFilter">
            <stringtomatch value="InventoryOperationDetail" />
            <AcceptOnMatch value="true" />
      <!-- log only specified logger -->
      <filter type="log4net.Filter.LoggerMatchFilter">
            <loggerToMatch value="CZ.Advantages.Asap.Workflow" />
            <acceptOnMatch value="true" />  
      <!-- do not log anything else -->
      <filter type="log4net.Filter.DenyAllFilter" />

Add new logger

<logger name="CZ.Advantages.Asap.DA.Service" additivity="false">
	<level value="DEBUG"/>
	<appender-ref ref="DALogFileAppender"/>
<logger name="CZ.Advantages.Asap.Workflow" additivity="false">
        <level value="DEBUG"/>
        <appender-ref ref="DALogFileAppender"/>

Enjoy your logging :smiley:

1 Like

Is there a way how to log only specific group of workflow steps or subtree of specific workflow?

It is not possible. Unfortunately the log does not include the information about the currently running sequential workflow in every log entry, so it is not possible to use a filter.