Branch: Tag:

2001-07-31

2001-07-31 12:02:32 by Per Hedbor <ph@opera.com>

Only show the first 1k entries of the event log per default. Solves [Bug 1666 (#1666)]

Rev: server/config_interface/event_log/log.pike:1.9
Rev: server/config_interface/sites/log.pike:1.9
Rev: server/config_interface/sites/site_content.pike:1.118

14:    return id->variables->reversed?-a[-1]:a[0];    });    sort(r2,report); -  for(int i=0;i<sizeof(report);i++) +  for(int i=0;i<min(sizeof(report),1000);i++)    report[i] = describe_error(report[i], log[report[i]],    id->misc->cf_locale, 1); -  return (sizeof(report)?(report*""):LOCALE(250, "Empty")); +  +  if( sizeof( report ) >= 1000 ) +  report[1000] = +  sprintf(LOCALE(0,"%d entries skipped. Present in log on disk"), +  sizeof( report )-999 ); +  +  return (sizeof(report)?(report[..1000]*""):LOCALE(250, "Empty"));   }