IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 23, 2011, 4:27:17 PM (15 years ago)
Author:
rhenders
Message:

Introduced new logging system in order to provide proper audit trail

File:
1 edited

Legend:

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

    r31025 r31030  
    5757  Constructor
    5858  */
    59 InitBatch* new_InitBatch(int *argc, char **argv) {
     59InitBatch* new_InitBatch(Logger* logger, int *argc, char **argv) {
    6060
     61    logger->print(logger, MSG_DEBUG, "InitBatch: Constructor\n");
    6162    InitBatch *this = (InitBatch*)calloc(1, sizeof(InitBatch));
    6263
    6364    // call base-class constructor
    64     if (!new_Batch(&this->base)) {
    65 
    66         psError(PS_ERR_IO, false, "Unable to create Batch base-class object");
    67         return this;
    68     }
     65    new_Batch(logger, &this->base);
    6966
    7067    // method pointers
     
    8582    psTimerStart("initbatch");
    8683
    87     ippToPsps_VersionPrint();
     84//    ippToPsps_VersionPrint();
    8885
    8986    int exitCode;
    9087
    91     InitBatch* initBatch = new_InitBatch(&argc, argv);
     88    Logger* logger = new_Logger(NULL);
     89
     90    InitBatch* initBatch = new_InitBatch(logger, &argc, argv);
    9291    initBatch->base.run(initBatch);
    9392    exitCode = initBatch->base.exitCode;
     
    9796    double secs = psTimerMark("initbatch");
    9897
    99     psLogMsg("initbatch", 3, "initbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n",
     98    logger->print(logger, MSG_INFO, "initbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n",
    10099            (exitCode == PS_EXIT_SUCCESS) ? "" : "un",
    101100            exitCode,
     
    106105    psTimerStop();
    107106    psLibFinalize();
     107    logger->destroy(logger);
    108108
    109109    return exitCode;
Note: See TracChangeset for help on using the changeset viewer.