dd2f1d | 1999-11-17 | Per Hedbor | | inherit "../logutil.pike";
#include <config.h>
#include <roxen.h>
|
23414a | 2000-07-21 | Andreas Lange | |
#define LOCALE(X,Y) _STR_LOCALE("roxen_config",X,Y)
|
dd2f1d | 1999-11-17 | Per Hedbor | |
|
cf2dec | 2000-07-11 | Martin Nilsson | | string parse(RequestID id)
|
dd2f1d | 1999-11-17 | Per 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);
|
5c1206 | 2001-07-31 | Per Hedbor | | for(int i=0;i<min(sizeof(report),1000);i++)
|
c60cae | 2000-02-02 | Johan Sundström | | report[i] = describe_error(report[i], log[report[i]],
id->misc->cf_locale, 1);
|
5c1206 | 2001-07-31 | Per Hedbor | |
|
35faaa | 2017-05-02 | Martin Karlgren | | if( sizeof( report ) > 1000 )
|
5c1206 | 2001-07-31 | Per Hedbor | | report[1000] =
|
9fa11d | 2001-08-24 | Martin Nilsson | | sprintf(LOCALE(467,"%d entries skipped. Present in log on disk"),
|
35faaa | 2017-05-02 | Martin Karlgren | | sizeof( report )-1000 );
|
5c1206 | 2001-07-31 | Per Hedbor | |
return (sizeof(report)?(report[..1000]*""):LOCALE(250, "Empty"));
|
dd2f1d | 1999-11-17 | Per Hedbor | | }
|