On Thu, Jun 23, 2011 at 3:09 PM, Mike Capp <[email protected]> wrote:
> On 23 June 2011 20:51, Brian Anderson <[email protected]> wrote:
>> We had a discussion today about what belongs in the standard library.
>> Here are the notes, which are also available on the wiki.
>
> Hmm, no mention of logging. Did this come up at all?

Not in this discussion, but it has come up recently. More robust
logging is definitely on the radar.

>
> From what I can see, Rust's logging facilities are geared toward
> current dogfood usage, i.e. line-based direct to stderr. For server
> apps running as part of a big farm, or thick-client apps running on an
> end-user desktop, this isn't very helpful; what's wanted is to batch
> up the error log with any note logs associated with it, and send it
> off to a central logging DB.

There will be some sort of interface for hooking into the logging
mechanism. As you say, the current logging capabilities are minimal.

>
> In itself this isn't too scary; one can envisage plugging in a log
> handler backend that can batch/sort/filter/flush individual log lines,
> trigger notifications etc. These backends probably don't belong in
> std. But the hooks for them do, especially since they may point to
> syntax changes. For example, I think there's a case to be made for
> combining the current
>
>    log_err("oops");
>    fail;
>
> idiom into a single
>
>    fail("oops");

I believe this form of fail was added to the language recently.

>
> expression, because in the idiomatic version there's no way for a
> batching log handler to unambiguously associate the error log with the
> failure, and thus with any note logs associated with the failure's
> unwinding.
>
> (I'm also having trouble seeing how I could get high-level context,
> e.g. from top-level or intermediate task scope, included in a log
> batch. Current docs mention callers getting notified of task failure,
> but I haven't found any specifics.)

There aren't a lot of specifics yet, but I believe everything you are
hoping for here will be possible (someday).

>
> cheers,
> Mike
>
> Disclaimer: as a noncontributing lurker, all opinions expressed above
> should be multiplied by a meritocratic weighting factor of 0.
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to