Use logging and FeedBackService

In Designer-built forms, you can write messages to both the Workflow client log file and the feedback zone. This requires editing the code behind in the MainPage.xaml.

For example, insert the highlighted code snippet into your MainPage constructor:
public MainPage()
{
     Loaded += (o, e ) => 
      { 
         var message = String.Format("Loaded form {0}",
 GetType().FullName); 
     FeedbackService.AddMessage("LoadUnload", FeedbackMessageType.Info,
 message); 
      _logger.Info(message);
      };
      }
A more common use of the logger is to catch various exceptions and log them:
 
    void TrySomethingRisky()
    {
        try
        {
              ...
              .
              .
           }
           catch (Exception e)
           {
                _logger.Error(e.Message);
             }
     }