dd2f1d1999-11-17Per Hedbor inherit "../logutil.pike"; #include <config.h>
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] =
8ba1822002-06-15Martin Nilsson  sprintf("%d entries skipped. Present in log on disk",
5c12062001-07-31Per Hedbor  sizeof( report )-999 );
8ba1822002-06-15Martin Nilsson  return (sizeof(report)?(report[..1000]*""):"Empty");
dd2f1d1999-11-17Per Hedbor }