code: private void sendNotification(Sid accountId, String errMessage, int errCode, String errType, boolean createNotification) {
          NotificationsDao notifications = storage.getNotificationsDao();
          Notification notification;
  
          if (errType == "warning") {
              if (logger.isDebugEnabled()) {
                  // https://github.com/RestComm/Restcomm-Connect/issues/1419 moved to debug to avoid polluting logs
                  logger.debug(errMessage); // send message to console
              }
              if (createNotification) {
                  notification = notification(accountId, ERROR_NOTIFICATION, errCode, errMessage);
                  notifications.addNotification(notification);
              }
          } else if (errType == "error") {
              // https://github.com/RestComm/Restcomm-Connect/issues/1419 moved to debug to avoid polluting logs
              if (logger.isDebugEnabled()) {
                  logger.debug(errMessage); // send message to console
              }
              if (createNotification) {
                  notification = notification(accountId, ERROR_NOTIFICATION, errCode, errMessage);
                  notifications.addNotification(notification);
              }
          } else if (errType == "info") {
              // https://github.com/RestComm/Restcomm-Connect/issues/1419 moved to debug to avoid polluting logs
              if (logger.isDebugEnabled()) {
                  logger.debug(errMessage); // send message to console
              }
          }
  
      }
docs: used for sending warning and error logs to notification engine and to the console