9 Replies Latest reply on Jul 31, 2014 4:04 PM by Dori Bearham

    log4net logging: not writing to the event log in custom subtasks

    Dori Bearham

      In our custom subtasks there is code to write to log4net logs when an error occurs during processing. However, the messages are not getting written. Log messages from other customs and OOTB messages do get written to the log, it's just subtasks that are having an issue. I understand how log4net works and am familiar with the miner.log4net.config file. I use log4net for other logging as well. So I don't understand why it's not working with subtasks. Does Workflow Manager use the miner log4net configuration? Is there any special setup in WFM? Or do I need my own log4net config file?


      I define the logger:

              private static ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);


      and write the message

              if (pxNodeWR.NodeType != PxApp.Helper.GetNodeTypeID(WORKREQUEST))


                  Log.Error("Send To Cayenta was not executed on a work request. This subtask should only be put on work request nodes.");

                  MessageBox.Show("Send To Cayenta subtask failed: the subtask was not executed on a work request. This subtask should only be assigned to a work request.",

                                                           "SendToCayenta Subtask", MessageBoxButtons.OK,


                  return false;



      Thanks for any suggestions!