Re: error handling, logging, debugging and trouble-shooting

will kahn-greene <[email protected]> Sat, 02 Apr 2011 12:17:17 -0400
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
On 04/02/2011 12:13 PM, Dieter Plaetinck wrote:
> On Sat, 02 Apr 2011 12:02:20 -0400
> will kahn-greene <[email protected]> wrote:
> 
>> verification
>> ------------
>>
>> We added some configuration verification stuff to PyBlosxom which you
>> can run on the command line.  This enables PyBlosxom to tell you what's
>> horribly wrong with your config.py file and also ask plugins to do the
>> same.  The problem here is two-fold:
>>
>> 1. since it's run from the command line and not the web-server, this
>> can't point out any permissions issues
> 
> this can be solved by telling users "when you do a verification on commandline, be sure to run it as the same user your web process runs as"; if they have any problem with this, I would classify it as PEBKAC

That only works if you have access to the account the server runs under,
so I think we should do more.


>> 2. Change logging so that it:
>>
>> 2.1. always logs to stderr
> Why would you do this?
> stderr is for errors and warnings. regular output should go stdout.
> I don't like it when software violates this.  If you have a restriction like "cannot use stdout because that's for page content in CGI, or something like that" , still only use stderr for errors/warnings, if you want to log regular things but you can't use stdout, use a logfile.

Sorry about that--I wasn't very clear here.  This email is about
trouble-shooting, so I'm just talking about logging that is
error/warning based.

/will

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf