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 
35faaa2017-05-02Martin Karlgren  if( sizeof( report ) > 1000 )
5c12062001-07-31Per Hedbor  report[1000] =
9fa11d2001-08-24Martin Nilsson  sprintf(LOCALE(467,"%d entries skipped. Present in log on disk"),
35faaa2017-05-02Martin Karlgren  sizeof( report )-1000 );
5c12062001-07-31Per Hedbor  return (sizeof(report)?(report[..1000]*""):LOCALE(250, "Empty"));
dd2f1d1999-11-17Per Hedbor }