code: private void sendNotification(String errMessage, int errCode, String errType, boolean createNotification) {
          NotificationsDao notifications = storage.getNotificationsDao();
          Notification notification;
  
          if (errType == "warning") {
              logger.warning(errMessage); // send message to console
              if (createNotification) {
                  notification = notification(WARNING_NOTIFICATION, errCode, errMessage);
                  notifications.addNotification(notification);
              }
          } else if (errType == "error") {
              logger.error(errMessage); // send message to console
              if (createNotification) {
                  notification = notification(ERROR_NOTIFICATION, errCode, errMessage);
                  notifications.addNotification(notification);
              }
          } else if (errType == "info") {
              if (logger.isInfoEnabled()) {
                  logger.info(errMessage); // send message to console
              }
          }
      }
docs: used for sending warning and error logs to notification engine and to the console