dd2f1d1999-11-17Per Hedbor inherit "../logutil.pike"; #include <config.h> #include <roxen.h>
23414a2000-07-21Andreas Lange //<locale-token project="roxen_config">LOCALE</locale-token> #define LOCALE(X,Y) _STR_LOCALE("roxen_config",X,Y)
dd2f1d1999-11-17Per Hedbor 
cf2dec2000-07-11Martin Nilsson string parse(RequestID id)
dd2f1d1999-11-17Per Hedbor { mapping log = id->misc->current_configuration->error_log; array report = indices(log), r2; last_time=0; r2 = map(values(log),lambda(array a){ return id->variables->reversed?-a[-1]:a[0]; }); sort(r2,report);
5c12062001-07-31Per Hedbor  for(int i=0;i<min(sizeof(report),1000);i++)
c60cae2000-02-02Johan Sundström  report[i] = describe_error(report[i], log[report[i]], id->misc->cf_locale, 1);
5c12062001-07-31Per Hedbor  if( sizeof( report ) >= 1000 ) report[1000] =
d6dc072001-08-05Martin Nilsson  sprintf(LOCALE(386,"%d entries skipped. Present in log on disk"),
5c12062001-07-31Per Hedbor  sizeof( report )-999 ); return (sizeof(report)?(report[..1000]*""):LOCALE(250, "Empty"));
dd2f1d1999-11-17Per Hedbor }