Changeset 375 for cpp/frams/param
- Timestamp:
- 04/26/15 00:59:09 (10 years ago)
- Location:
- cpp/frams/param
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/multiparamload.cpp
r372 r375 5 5 #include "multiparamload.h" 6 6 #include <frams/util/sstringutils.h> 7 #include "common/ hmessage.h"7 #include "common/log.h" 8 8 #include <ctype.h> 9 9 … … 107 107 else if (status==BeforeUnknown) 108 108 { 109 Hprintf("MultiParamLoader","go",HMLV_WARN,"Skipping object '%s'",lastunknown.c_str());109 logPrintf("MultiParamLoader","go",LOG_WARN,"Skipping object '%s'",lastunknown.c_str()); 110 110 loadObjectNow(&emptyparam,false); 111 111 continue; … … 137 137 { 138 138 const char* thisfilename=file->VgetPath(); 139 Hprintf("MultiParamLoader","go",HMLV_WARN,"invalid \"%s\"%s%s",buf.c_str(),139 logPrintf("MultiParamLoader","go",LOG_WARN,"invalid \"%s\"%s%s",buf.c_str(), 140 140 (thisfilename?" in ":""),(thisfilename?thisfilename:"")); 141 141 } … … 204 204 if (alreadyIncluded(newfilename.c_str())) 205 205 { 206 Hprintf("MultiParamLoader","include",HMLV_WARN,"circular reference ignored (\"%s\")",206 logPrintf("MultiParamLoader","include",LOG_WARN,"circular reference ignored (\"%s\")", 207 207 filename.c_str()); 208 208 return; … … 212 212 if (!f) 213 213 { 214 Hprintf("MultiParamLoader","include",HMLV_WARN,"\"%s\" not found",newfilename.c_str());214 logPrintf("MultiParamLoader","include",LOG_WARN,"\"%s\" not found",newfilename.c_str()); 215 215 } 216 216 else -
cpp/frams/param/param.cpp
r372 r375 8 8 #include "param.h" 9 9 #include <frams/util/extvalue.h> 10 #include "common/ hmessage.h"10 #include "common/log.h" 11 11 #include <frams/util/sstringutils.h> 12 12 … … 445 445 { 446 446 SString name(p0, p_len); 447 Hprintf("ParamInterface", "load", HMLV_WARN, "Ignored unknown property '%s' while reading object '%s'", name.c_str(), getName());447 logPrintf("ParamInterface", "load", LOG_WARN, "Ignored unknown property '%s' while reading object '%s'", name.c_str(), getName()); 448 448 } 449 449 … … 518 518 case 'o': ret.setObject(getObject(i)); break; 519 519 case 'x': ret = getExtValue(i); break; 520 default: Hprintf("ParamInterface", "get", HMLV_ERROR, "'%s.%s' is not a field", getName(), id(i));520 default: logPrintf("ParamInterface", "get", LOG_ERROR, "'%s.%s' is not a field", getName(), id(i)); 521 521 } 522 522 } … … 562 562 if (v.type == TObj) 563 563 { 564 Hprintf("ParamInterface", "set", HMLV_WARN, "Getting integer value from object reference (%s)", v.getString().c_str());564 logPrintf("ParamInterface", "set", LOG_WARN, "Getting integer value from object reference (%s)", v.getString().c_str()); 565 565 return 0; 566 566 } … … 574 574 if (v.type == TObj) 575 575 { 576 Hprintf("ParamInterface", "set", HMLV_WARN, "Getting floating point value from object reference (%s)", v.getString().c_str());576 logPrintf("ParamInterface", "set", LOG_WARN, "Getting floating point value from object reference (%s)", v.getString().c_str()); 577 577 return 0; 578 578 } … … 583 583 case 'o': return setObject(i, v.getObject()); 584 584 case 'x': return setExtValue(i, v); 585 default: Hprintf("ParamInterface", "set", HMLV_ERROR, "'%s.%s' is not a field", getName(), id(i));585 default: logPrintf("ParamInterface", "set", LOG_ERROR, "'%s.%s' is not a field", getName(), id(i)); 586 586 } 587 587 return 0; … … 605 605 if ((after == NULL) || (*after)) 606 606 { 607 Hprintf("ParamInterface", "set", HMLV_WARN, "serialization format mismatch in %s.%s", (getName() ? getName() : "<Unknown>"), id(i));607 logPrintf("ParamInterface", "set", LOG_WARN, "serialization format mismatch in %s.%s", (getName() ? getName() : "<Unknown>"), id(i)); 608 608 e.setEmpty(); 609 609 } … … 690 690 } 691 691 if (err!=NULL) 692 Hprintf("SimpleAbstractParam","sanityCheck", HMLV_ERROR,692 logPrintf("SimpleAbstractParam","sanityCheck", LOG_ERROR, 693 693 "Invalid ParamEntry for %s.%s (%s)", getName(), pe->id, err); 694 694 } … … 961 961 else 962 962 { 963 Hprintf("SimpleAbstractParam", "call", HMLV_ERROR,963 logPrintf("SimpleAbstractParam", "call", LOG_ERROR, 964 964 (*pe->type != 'p') ? "'%s.%s' is not a function" : "Internal error - undefined function pointer for '%s.%s'", getName(), pe->id); 965 965 ret->setInvalid(); … … 1060 1060 { 1061 1061 SString name(t, (int)(equals_sign - t)); 1062 Hprintf("Param", "load2", HMLV_WARN, "Unknown property '%s' while reading object '%s' (ignored)", name.c_str(), getName());1062 logPrintf("Param", "load2", LOG_WARN, "Unknown property '%s' while reading object '%s' (ignored)", name.c_str(), getName()); 1063 1063 } 1064 1064 t = equals_sign + 1; // t=value … … 1070 1070 #endif 1071 1071 { 1072 Hprintf("Param", "load2", HMLV_WARN, "Missing property name in '%s' (assuming '%s')",1072 logPrintf("Param", "load2", LOG_WARN, "Missing property name in '%s' (assuming '%s')", 1073 1073 getName(), id(i) ? id(i) : "unknown property?"); 1074 1074 } … … 1092 1092 fields_loaded++; 1093 1093 if (ret&(PSET_HITMAX | PSET_HITMIN)) 1094 Hprintf("Param", "load2", HMLV_WARN, "Adjusted '%s' in '%s' (was too %s)",1094 logPrintf("Param", "load2", LOG_WARN, "Adjusted '%s' in '%s' (was too %s)", 1095 1095 id(i), getName(), (ret&PSET_HITMAX) ? "big" : "small"); 1096 1096 *(char*)valstop = remember; -
cpp/frams/param/param.h
r372 r375 12 12 #include <frams/util/statrick.h> 13 13 #include <frams/virtfile/virtfile.h> 14 #include <common/ hmessage.h>14 #include <common/log.h> 15 15 16 16 class ExtValue; … … 273 273 SString svaluetoset = SString::valueOf(valuetoset); //converts any type to SString 274 274 SString actual = get(i); 275 Hprintf("Param", "set", HMLV_WARN, "Setting '%s.%s = %s' exceeded allowed range (too %s). Adjusted to %s.",275 logPrintf("Param", "set", LOG_WARN, "Setting '%s.%s = %s' exceeded allowed range (too %s). Adjusted to %s.", 276 276 getName(), id(i), svaluetoset.c_str(), (setflags&PSET_HITMAX) ? "big" : "small", actual.c_str()); 277 277 }
Note: See TracChangeset
for help on using the changeset viewer.