Configuring event logging for the promotion engine

Enable event logging to track problems related to promotion events. The events are written to the SystemOut.log file that contains all other WebSphere Commerce output. When you enable event logging, promotion events from both WebSphere Commerce Accelerator and Management Center are included in the file.

Instead of enabling event logging as described in this topic, consider using the WebSphere Commerce Server logging service instead. This way, you have the option to enable trace on a running server, if required.

Procedure

  1. Edit the promotion engine configuration XML file in an editor. You can find this file in the following location: WC_eardir/xml/PromotionEngineConfiguration/WCSPromotionEngineConfig.xml
  2. Update the following code segment:
    <!--        
    <Listener
    impl="com.ibm.commerce.marketing.promotion.event.PrintPromotionLifeCycleEventListener">
       <Name>PrintLifeCycleEventListener</Name>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionChangedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionCreatedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionDeployedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionRemovedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionResetEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionResumedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionSuspendedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionWithdrawnEvent</ListensFor>
    
    </Listener>
    
    <Listener
    impl="com.ibm.commerce.marketing.promotion.event.PrintPromotionExecutionEventListener">
       <Name>PrintExecutionEventListener</Name>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionAssessedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionAppliedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionEliminatedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionQualifiedEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionRejectedEvent</ListensFor>
    </Listener>
    
    <Listener
    impl="com.ibm.commerce.marketing.promotion.event.PrintPromotionRASEventListener">
       <Name>PrintRASEventListener</Name>
       
    <StoreKey>
          <DN>ou=BlueMall B2C Organization,o=Seller
    Organization,o=Root Organization</DN>
          <Identifier>BlueStore 201</Identifier>
       </StoreKey>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionDebugEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionErrorEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionLogEvent</ListensFor>
      
    <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionTraceEvent</ListensFor>
       </Listener>
    -->
    
    Remove the segments in bold to enable event logging. This includes the comment delimiter (<!-- and -->) and the entire StoreKey XML element.
  3. Save the file.
  4. Restart the WebSphere Commerce Server.

Results

The trace is written to the SystemOut.log file that contains all other WebSphere Commerce output. When you have captured the required trace information, you should disable tracing as it might negatively affect performance.