[Grok-dev] switching of fgrok warnings on startup
Uli Fouquet
uli at gnufix.de
Thu May 20 04:48:06 EDT 2010
Hi there,
Martijn Faassen wrote:
> Wichert Akkerman wrote:
>
> > Can you make that warning log at a level that isn't normally shown for
> > grok 1.1.1? It's not a terribly important (or useful) warning, so there
> > should not be any harm.
>
> That's a good idea.
>
> It's a useful warning if it actually works (just to encourage not
> leaving dead code around), but it's indeed not very important. I'd be
> willing to do away with this warning at normal warning levels.
>
> Could you look into this, Uli? I think it requires a new grokcore.view.
> We'd also need a bit of documentation somewhere saying how to turn up
> the warning level in case people are interested in this.
>
> Then when we're at Grok 1.2, we can turn the warning back on.
After a quick look into this I am a bit stuck with the best technique to
tell, that a user _wants_ warnings. To be more precisely: what is the
best way to tell 'the system' to display the warnings?
Telling it via zope.conf seems not to be an option: we had to
reintroduce dependecies like zope.app.appsetup, etc., and could not
easily separate "deployment-runs" from "debug-runs".
Setting it via an environment variable might work:
$ GROKWARNINGS=1 paster serve parts/etc/deploy.ini
and grokcore.view could check for this var before disabling warnings.
But is there an option to set such environment vars via deploy.ini,
debug.ini? Any paster-geeks in here?
Or are there any other ideas how to tell 'the system' (not) to emit
warnings?
Best regards,
--
Uli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20100520/b24837c6/attachment.bin
More information about the Grok-dev
mailing list