Changeset 9557

Show
Ignore:
Timestamp:
04/26/06 11:17:34 (3 years ago)
Author:
piotras
Message:

debug_start and stop fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/branch-1-7/src/apis/php4/midgard.c

    r9556 r9557  
    120120MGD_FUNCTION(ret_type, config_init, (type_param)); 
    121121MGD_FUNCTION(ret_type, get_new_object_by_guid, (type_param)); 
     122MGD_FUNCTION(ret_type, check_quota, (type_param)); 
    122123 
    123124/* Undocumented */ 
     
    27052706void mgd_debug_log_calls() 
    27062707{ 
    2707   midgard_request_config *rcfg = mgd_rcfg(); 
    27082708  midgard * mgd = mgd_handle();   
    27092709  char * called; 
     
    27132713  called = get_active_function_name(TSRMLS_C); 
    27142714 
    2715   if (rcfg) { 
    2716     if (rcfg->phpdbg == 1) { 
    2717       g_log("midgard-php", G_LOG_LEVEL_WARNING, " Request at SG: %d", mgd_sitegroup(mgd));  
    2718       g_log("midgard-php", G_LOG_LEVEL_WARNING, " MidgardTrace: %s(...)", called );   
    2719     } 
    2720   } 
     2715  g_log("midgard-lib", G_LOG_LEVEL_INFO, " Midgard-php: %s(...)", called );   
     2716 
     2717 
    27212718} 
    27222719 
     
    27242721MGD_FUNCTION(ret_type, debug_start, (type param)) 
    27252722{ 
    2726   //midgard_request_config *rcfg = mgd_rcfg(); 
    27272723  guint logspec; 
    27282724  const char *  loglevel = "Debug+"; 
     
    27302726    if (ZEND_NUM_ARGS() != 0) { WRONG_PARAM_COUNT; } 
    27312727     
    2732     //rcfg->phpdbg = 1;  
    2733  
    27342728    logspec = mgd_parse_log_levels(loglevel); 
    27352729    loglevelid = g_log_set_handler("midgard-lib", logspec , mgd_log_debug_default, NULL); 
     
    27392733MGD_FUNCTION(ret_type, debug_stop, (type param)) 
    27402734{ 
    2741    
    2742   //midgard_request_config *rcfg = mgd_rcfg(); 
    2743   guint logspec; 
    2744   const char *  loglevel = "Warn+"; 
    2745      
    2746  
    2747     if (ZEND_NUM_ARGS() != 0) { WRONG_PARAM_COUNT; } 
    2748  
    2749     //rcfg->phpdbg = 0; 
    2750  
    2751     g_log_remove_handler("midgard-lib",loglevelid); 
    2752     logspec = mgd_parse_log_levels(loglevel); 
    2753     g_log_set_handler("midgard-lib", logspec , mgd_log_debug_default, NULL); 
    2754     _log_file = stderr; 
    2755      
     2735        guint logspec;   
     2736        const char *  loglevel = "Warn+"; 
     2737         
     2738        if (ZEND_NUM_ARGS() != 0) { WRONG_PARAM_COUNT; } 
     2739         
     2740        g_log_remove_handler("midgard-lib",loglevelid); 
     2741        logspec = mgd_parse_log_levels(loglevel); 
     2742        g_log_set_handler("midgard-lib", logspec , mgd_log_debug_default, NULL); 
     2743        _log_file = stderr;    
    27562744} 
    27572745