Roxen.git / server / config_interface / actions / debug_summary.pike

version» Context lines:

Roxen.git/server/config_interface/actions/debug_summary.pike:1:   /* -  * $Id: debug_summary.pike,v 1.1 2002/03/27 15:06:11 js Exp $ +  * $Id: debug_summary.pike,v 1.2 2002/03/27 15:36:20 js Exp $    */   #include <stat.h>   #include <roxen.h>   //<locale-token project="admin_tasks">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("admin_tasks",X,Y)      constant action = "debug_info";      LocaleString name= LOCALE(0,"Debug Summary");   LocaleString doc = LOCALE(0,
Roxen.git/server/config_interface/actions/debug_summary.pike:37:      string indent(string text, int level)   {    array a=text/"\n";    for(int i=0; i<sizeof(a); i++)    if(sizeof(a[i]))    a[i]=" "*level+a[i];    return a*"\n";   }    - string describe_var(mixed value) + string describe_var_low(mixed value)   {    if(arrayp(value)) -  return "{"+map(value, describe_var)*", "+"}"; +  return "{"+map(value, describe_var_low)*", "+"}";    else    return sprintf("%O", value);   }    -  + string describe_var(mixed var) + { +  if(var->type=="Password" || var->type=="VerifiedPassword") +  return "***** (censored)"; +  else +  return describe_var_low(var->query()); + } +    string make_headline(string title)   {    return sprintf("%s:\n%s\n", title, "-"*(sizeof(title)+1));   }      string make_environment_summary()   {    string res = make_headline("Environment");    res+=sprintf(" %-30s %s\n", "Version:", roxen_version());    res+=sprintf(" %-30s %s", "Time:", ctime(time()));
Roxen.git/server/config_interface/actions/debug_summary.pike:84:    return res;   }      string make_variables_summary(mapping vars)   {    string res="";    foreach(sort(indices(vars)), string varname)    res+=sprintf("%s%-30s %s\n",    vars[varname]->is_defaulted()?" ":" *",    varname+":", -  describe_var(vars[varname]->query())); +  describe_var(vars[varname]));    return res;   }      string make_extra_module_info(RoxenModule module)   {    if(module->debug_summary && functionp(module->debug_summary))    {    string res="\n"+make_headline("Extra info");    mixed err=catch(res += indent(module->debug_summary(), 1));    if(err)