Opened 16 years ago

Last modified 9 years ago

#49 new enhancement

Make logview work — at Version 4

Reported by: price Owned by: geofft
Priority: major Milestone:
Component: web Keywords:
Cc:

Description (last modified by ezyang)

logview suffers from two problems that sharply limit its value to users:

  • its dependence on grep makes it miss out many errors entirely;
  • we don't have a good setup for getting logs from both servers.

The second problem is relatively easy to fix; #23 describes one approach that should be easy to implement and solve that problem.

The first is harder. Ideally Apache would put a request's logs someplace corresponding to the locker. Maybe this could be at suexec time. But, e.g., mod_rewrite errors, which are common causes of pulled-out user hair, happen before suexec time, so ideally we'd do something earlier.


Here is a proposal, which I may have the good properties we want.

  1. Apache based errors continue to go to /home/logview/error_log.
  2. Errors from suexec'd binaries now have their errors go to per-user files. This is arranged for by suexec, which replaces the stderr fd with an fd to a file it opened.
  3. error_log now is watched by a zephyr daemon, which has the following behavior. By default, it ignores all entries in the log. However, it is subscribed to -c scripts-logs; when it receives an authenticated zephyr from a user requesting logs for a locker, it checks if the user is admof locker. If so, it sets up a new rule, which sends class'd personals (name?) to that user of error logs corresponding to that locker. We remove rules when the zephyr notifies us no one is listening to our zephyrs.
  4. We setup a custom BarnOwl?, so users can run 'athrun scripts logview locker', and they get a BarnOwl? which sends the control zephyr and subscribes to the relevant class to view errors for the class. It might even be nifty if we have some commands for subscribing to more errors, though not strictly necessary.
  5. Setup similar daemons for the per-user stderr logs.

Change History (5)

comment:1 Changed 16 years ago by andersk

  • Priority changed from major to critical

nelhage says this is why he never deploys anything on scripts, and I don’t blame him. This is a hard problem but it shouldn’t be intractable.

Changed 15 years ago by broder

comment:2 Changed 15 years ago by broder

  • Owner set to geofft

comment:3 Changed 12 years ago by ezyang

  • Type changed from defect to enhancement

comment:4 Changed 12 years ago by ezyang

  • Description modified (diff)
Note: See TracTickets for help on using tickets.