code: public static TraceFormat getFormatValue(Object newValue, TraceFormat defaultValue) {
          if (newValue != null && newValue instanceof String) {
              String strValue = ((String) newValue).toUpperCase();
              try {
                  return TraceFormat.valueOf(strValue);
              } catch (Exception e) {
              }
          }
  
          return defaultValue;
      }
docs: Convert the property value to a TraceFormat type
  
  @param s
  String value
  @return TraceFormat, BASIC is the default.