Changeset 10460
- Timestamp:
- Dec 4, 2006, 4:31:24 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfig.c (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfig.c
r10447 r10460 4 4 * @author EAM (IfA) 5 5 * 6 * @version $Revision: 1.5 8$ $Name: not supported by cvs2svn $7 * @date $Date: 2006-12-0 4 22:21:28$6 * @version $Revision: 1.59 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2006-12-05 02:31:24 $ 8 8 * 9 9 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 148 148 // find the first existing entry in the path (starting with the bare name) 149 149 realName = psStringCopy (name); 150 psTrace ( __func__, 5, "trying %s\n", realName);150 psTrace ("psModules.config", 5, "trying %s\n", realName); 151 151 152 152 int status = stat (realName, &filestat); … … 169 169 realName = psStringCopy (configPath->data[i]); 170 170 psStringAppend (&realName, "/%s", name); 171 psTrace ( __func__, 5, "trying %s\n", realName);171 psTrace ("psModules.config", 5, "trying %s\n", realName); 172 172 173 173 status = stat (realName, &filestat); … … 234 234 psArgumentRemove(argNum, config->argc, config->argv); 235 235 if (argNum >= *config->argc) { 236 psLogMsg( __func__, PS_LOG_WARN,236 psLogMsg("psModules.config", PS_LOG_WARN, 237 237 "-site command-line switch provided without the required filename --- ignored.\n"); 238 238 } else { … … 308 308 psArgumentRemove(argNum, config->argc, config->argv); 309 309 if (argNum >= *config->argc) { 310 psLogMsg( __func__, PS_LOG_WARN, "-log command-line switch provided without the "310 psLogMsg("psModules.config", PS_LOG_WARN, "-log command-line switch provided without the " 311 311 "required log destination --- ignored.\n"); 312 312 } else { 313 313 if (!psLogSetDestination(psMessageDestination(config->argv[argNum]))) { 314 psLogMsg( __func__, PS_LOG_WARN, "Unable to set log destination to %s\n",314 psLogMsg("psModules.config", PS_LOG_WARN, "Unable to set log destination to %s\n", 315 315 config->argv[argNum]); 316 316 } … … 325 325 // expanded in the future to do files, and perhaps even sockets. 326 326 if (!psLogSetDestination(psMessageDestination(logDest))) { 327 psLogMsg( __func__, PS_LOG_WARN, "Unable to set log destination to %s\n",327 psLogMsg("psModules.config", PS_LOG_WARN, "Unable to set log destination to %s\n", 328 328 config->argv[argNum]); 329 329 } … … 339 339 while ((traceItem = psMetadataGetAndIncrement(traceIter))) { 340 340 if (traceItem->type != PS_DATA_S32) { 341 psLogMsg( __func__, PS_LOG_WARN,341 psLogMsg("psModules.config", PS_LOG_WARN, 342 342 "The level for trace component %s is not of type S32 (%x)\n", 343 343 traceItem->name, traceItem->type); … … 368 368 // expanded in the future to do files, and perhaps even sockets. 369 369 if (!psTraceSetDestination(psMessageDestination(traceDest))) { 370 psLogMsg( __func__, PS_LOG_WARN, "Unable to set trace destination to %s\n", traceDest);370 psLogMsg("psModules.config", PS_LOG_WARN, "Unable to set trace destination to %s\n", traceDest); 371 371 372 372 } … … 417 417 psArgumentRemove(argNum, config->argc, config->argv); 418 418 if (argNum >= *config->argc) { 419 psLogMsg( __func__, PS_LOG_WARN,419 psLogMsg("psModules.config", PS_LOG_WARN, 420 420 "-camera command-line switch provided without the required camera or filename --- " 421 421 "ignored.\n"); … … 524 524 psMetadata *formats = psMetadataLookupMetadata(&mdok, camera, "FORMATS"); // List of formats 525 525 if (!mdok || !formats) { 526 psLogMsg( __func__, PS_LOG_WARN, "Unable to find list of FORMATS in camera %s --- ignored\n",526 psLogMsg("psModules.config", PS_LOG_WARN, "Unable to find list of FORMATS in camera %s --- ignored\n", 527 527 cameraName); 528 528 return false; … … 533 533 while ((formatsItem = psMetadataGetAndIncrement(formatsIter))) { 534 534 if (formatsItem->type != PS_DATA_STRING) { 535 psLogMsg( __func__, PS_LOG_WARN, "In camera %s, camera format %s is not of type STR --- "535 psLogMsg("psModules.config", PS_LOG_WARN, "In camera %s, camera format %s is not of type STR --- " 536 536 "ignored.\n", cameraName, formatsItem->name); 537 537 continue; … … 540 540 psMetadata *testFormat = NULL; // Format to test against what we've got 541 541 if (!pmConfigFileRead(&testFormat, formatsItem->data.V, formatsItem->name)) { 542 psLogMsg( __func__, PS_LOG_WARN, "Trouble reading reading camera format %s --- ignored.\n",542 psLogMsg("psModules.config", PS_LOG_WARN, "Trouble reading reading camera format %s --- ignored.\n", 543 543 formatsItem->name); 544 544 psFree(testFormat); … … 548 548 if (pmConfigValidateCameraFormat(testFormat, header)) { 549 549 if (!*format) { 550 psLogMsg( __func__, PS_LOG_INFO, "Camera %s, format %s matches header.\n", cameraName,550 psLogMsg("psModules.config", PS_LOG_INFO, "Camera %s, format %s matches header.\n", cameraName, 551 551 formatsItem->name); 552 552 *format = psMemIncrRefCounter(testFormat); 553 553 result = true; 554 554 } else { 555 psLogMsg( __func__, PS_LOG_WARN, "Camera %s, format %s also matches header --- ignored.\n",555 psLogMsg("psModules.config", PS_LOG_WARN, "Camera %s, format %s also matches header --- ignored.\n", 556 556 cameraName, formatsItem->name); 557 } 558 } else { 559 if (psTraceGetLevel ("psModules.config") >= PS_LOG_INFO) { 560 psErrorStackPrint (stderr, "Camera %s, format %s does not match\n", cameraName, formatsItem->name); 557 561 } 558 562 } … … 589 593 camerasItem->comment); 590 594 if (camerasItem->type != PS_DATA_STRING) { 591 psLogMsg( __func__, PS_LOG_WARN, "Camera configuration for %s in CAMERAS is not of type STR "595 psLogMsg("psModules.config", PS_LOG_WARN, "Camera configuration for %s in CAMERAS is not of type STR " 592 596 "--- ignored.\n", camerasItem->name); 593 597 continue; … … 598 602 599 603 if (!pmConfigFileRead(&testCamera, camerasItem->data.V, camerasItem->name)) { 600 psLogMsg( __func__, PS_LOG_WARN, "Trouble reading reading camera configuration %s --- "604 psLogMsg("psModules.config", PS_LOG_WARN, "Trouble reading reading camera configuration %s --- " 601 605 "ignored.\n", camerasItem->name); 602 606 psFree(testCamera); … … 653 657 654 658 if (!pmConfigFileRead(&camera, cameraPath, cameraName)) { 655 psLogMsg( __func__, PS_LOG_WARN, "Trouble reading reading camera configuration %s", cameraName);659 psLogMsg("psModules.config", PS_LOG_WARN, "Trouble reading reading camera configuration %s", cameraName); 656 660 psFree(camera); 657 661 return NULL; … … 687 691 } 688 692 if (!(mdStatus01 && mdStatus02 && mdStatus03 && mdStatus04)) { 689 psLogMsg( __func__, PS_LOG_WARN,693 psLogMsg("psModules.config", PS_LOG_WARN, 690 694 "Could not determine database server, name, user, and password from site metadata.\n"); 691 695 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
