IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 24, 2011, 11:03:32 AM (15 years ago)
Author:
rhenders
Message:

Changes to reflect those in Logger class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/src/InitData.c

    r31030 r31033  
    6060
    6161    this->logger->print(this->logger, MSG_ERROR,
    62             "InitData: Could not find value for '%s' for '%s' with value '%s'\n",
     62            "InitData", "Could not find value for '%s' for '%s' with value '%s'\n",
    6363            attName, keyName, keyValue);
    6464
     
    8484    if (strcmp((const char*)rootElement->name, "tabledata")!=0) {
    8585        this->logger->print(this->logger, MSG_ERROR,
    86                 "InitData: Root node of XML is not 'tabledata', as it should be\n");
     86                "InitData", "Root node of XML is not 'tabledata', as it should be\n");
    8787        return false;
    8888    }
     
    156156    }
    157157
    158     this->logger->print(this->logger, MSG_DEBUG, "InitData: destructor\n");
     158    this->logger->print(this->logger, MSG_DEBUG, "InitData", "Destructor\n");
    159159
    160160    free(this);
     
    166166InitData* new_InitData(const char* path, Logger* logger) {
    167167
    168 
    169 
    170168    InitData* this = (InitData*)calloc(1, sizeof(InitData));
    171169    this->logger = logger;
    172170
    173     this->logger->print(this->logger, MSG_DEBUG, "InitData: Constructor\n");
     171    this->logger->print(this->logger, MSG_DEBUG, "InitData", "Constructor\n");
    174172
    175173    sprintf(this->path, "%s/init/data.xml", path);
    176174
    177175    this->doc = xmlReadFile(this->path, NULL, 0);
    178     this->logger->print(this->logger, MSG_ERROR,
    179             "InitData: Unable to open XML file at %s\n", this->path);
     176
     177    if (this->doc == NULL)
     178        this->logger->print(this->logger, MSG_ERROR,
     179                "InitData", "Unable to open init data file at '%s'\n", this->path);
     180    else
     181        this->logger->print(this->logger, MSG_INFO,
     182                "InitData", "Using init data file at '%s'\n", this->path);
     183
    180184
    181185    // method pointers
Note: See TracChangeset for help on using the changeset viewer.