code: private String getTypeString(final Type type) {
          if (type == null) return null;
          switch (type) {
              case ERROR:
                  return "ERROR";
              case INFO:
                  return "INFO";
              case WARN:
                  return "WARN";
              case DEBUG:
                  return "DEBUG";
          }
          return null;
      }
docs: /*
  This function takes in the message type and returns it as a string.
  
  @param type This is the error type.