code: public static boolean isMessageContentToBeLogged(final Message message, final boolean logMessageContent,
              boolean logMessageContentOverride) {
  
          /*
           * If controlling of logging behavior is not allowed externally
           * then log according to global property value
           */
          if (!logMessageContentOverride) {
              return logMessageContent;
          }
  
          Object logMessageContentExtObj = message.getContextualProperty(EXTERNAL_PROPERTY_NAME);
  
          if (null == logMessageContentExtObj) {
  
              return logMessageContent;
  
          } else if (logMessageContentExtObj instanceof Boolean) {
  
              return ((Boolean) logMessageContentExtObj).booleanValue();
  
          } else if (logMessageContentExtObj instanceof String) {
  
              String logMessageContentExtVal = (String) logMessageContentExtObj;
  
              if (logMessageContentExtVal.equalsIgnoreCase("true")) {
  
                  return true;
  
              } else if (logMessageContentExtVal.equalsIgnoreCase("false")) {
  
                  return false;
  
              } else {
  
                  return logMessageContent;
              }
          } else {
  
              return logMessageContent;
          }
      }
docs: If the "org.talend.esb.sam.agent.log.messageContent" property value is "true" then log the message content
  If it is "false" then skip the message content logging
  Else fall back to global property "log.messageContent"
  
  @param message
  @param logMessageContent
  @param logMessageContentOverride
  @return