﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc
49	Make logview work	price	geofft	"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."	enhancement	new	critical		web			
