On 02/01/2008, Noah Kantrowitz <[EMAIL PROTECTED]> wrote:
> If we want to go in this direction, making something more compatible
> with the standard logging module might be nice.
>
> add_warning(req, msg) -> req.log.warn(msg)
>
> I realize this is almost the exact opposite of the last change, but at
> least it would centralize things. We could even use the logging module
> and just make a new backend (not sure how that works, but I think it
> is possible). Thoughts?

This is a pretty cool idea. It'd be nice to have TracErrors rendered
in-page via req.log.error() as well. My only real concern is that it
might be overkill at this late stage, whereas add_notice() would be a
minor change.

To expand on my original requirements, I have two use-cases (so far) for
this on the new Trac-Hacks:

  - I'll be rendering informational messages about the tags on each hack
    page. eg. A page with the 0.11 tag will have the message:

      "This hack works with Trac 0.11"

    One with "unsupported" will render:

      "This hack is not supported by its author."

    and so-on.

  - Reddit-style voting [1] with a useful informational message the
    first time a user hits a page with voting, letting them know how to
    use the voting system.

[1] http://trac-hacks.org/wiki/VotePlugin


-- 
Evolution: Taking care of those too stupid to take care of themselves.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to