IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 23, 2010, 2:03:31 PM (16 years ago)
Author:
eugene
Message:

add visual facility management a la psTrace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/psModules/src/config/pmConfig.c

    r28287 r28435  
    3232
    3333#include "pmConfig.h"
     34#include "pmVisualUtils.h"
    3435
    3536#ifdef HAVE_NEBCLIENT
     
    638639        psArgumentVerbosity(argc, argv);
    639640        // XXX: substitute the string for the default log level for "2".
     641    }
     642
     643    // Set the visualization levels
     644    // argument format is: -visual (facil) (level)
     645    while ((argNum = psArgumentGet(*argc, argv, "-visual"))) {
     646        if ( (*argc < argNum + 3) ) {
     647            psError(PS_ERR_IO, true, "-visual switch specified without facility and level.");
     648            return NULL;
     649        }
     650        psArgumentRemove(argNum, argc, argv);
     651        pmVisualSetLevel(argv[argNum], atoi(argv[argNum+1]));
     652        psArgumentRemove(argNum, argc, argv);
     653        psArgumentRemove(argNum, argc, argv);
     654    }
     655    if ((argNum = psArgumentGet(*argc, argv, "-visual-all"))) {
     656        pmVisualSetLevel(".", 10);
     657    }
     658    if ((argNum = psArgumentGet(*argc, argv, "-visual-levels"))) {
     659        pmVisualPrintLevels(stdout);
    640660    }
    641661
Note: See TracChangeset for help on using the changeset viewer.