<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 18, 2019 at 11:16 AM Augie Fackler <<a href="mailto:raf@durin42.com">raf@durin42.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Jul 16, 2019, at 13:27, Georges Racinet <<a href="mailto:georges.racinet@octobus.net" target="_blank">georges.racinet@octobus.net</a>> wrote:<br>
> <br>
> Hi there,<br>
> <br>
> for the needs of Heptapod [1], I ended up writing a small extension to<br>
> divert all possible console output to the standard logging module, with<br>
> the option to send the logs to a Sentry application.<br>
> <br>
> The source is at <a href="https://dev.heptapod.net/heptapod/hgext-loggingmod" rel="noreferrer" target="_blank">https://dev.heptapod.net/heptapod/hgext-loggingmod</a> and<br>
> its README provides a fairly complete documentation.<br>
> <br>
> I think this extension would be useful in many more general server<br>
> settings, and should therefore probably be versioned with hg-core. Some<br>
> polishing would have to be made to bring it up to standard, and I'd be<br>
> happy to do that if people are interested.<br>
> <br>
> A short rationale:<br>
> <br>
> - blackbox only registers to `ui.log`, which itself doesn't have much,<br>
> unless `ui.debug` is True [2]. Also, it insists on outputting the logs<br>
> into the `.hg` directory, and that's pretty much useless for a multi<br>
> repo server<br>
> <br>
> - logtoprocess also registers to `ui.log`.<br>
> <br>
> - I wanted to make it easy to use Sentry, especially since GitLab has an<br>
> option to send its logs to Sentry by default, unsurprisingly covering<br>
> everything but Mercurial<br>
> <br>
> - I wanted to make it easily configurable, and to provide repository<br>
> information to use in the format. Together with the PID, that makes it<br>
> possible to extract only log lines pertaining to a given request.<br>
> <br>
> What do you think ?<br>
<br>
I think it makes sense. Kyle, I think we might want this for some of our hg API servers too? Having it in core seems sensible to me.<br></blockquote><div><br></div><div>Having it in core seems fine to me. I can see possible ways we can use it, yes :)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> Cheers,<br>
> <br>
> [1] That is, our modified GitLab CE that supports Mercurial<br>
> <br>
> [2] with `ui.debug` set to True, some of that debugging info actually<br>
> spills into the HTTP responses, making them incorrect.<br>
> <br>
> <br>
> -- <br>
> Georges Racinet<br>
> <a href="https://octobus.net" rel="noreferrer" target="_blank">https://octobus.net</a><br>
> GPG: BF5456F4DC625443849B6E58EE20CA44EF691D39, sur serveurs publics<br>
> <br>
> <br>
> _______________________________________________<br>
> Mercurial-devel mailing list<br>
> <a href="mailto:Mercurial-devel@mercurial-scm.org" target="_blank">Mercurial-devel@mercurial-scm.org</a><br>
> <a href="https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel" rel="noreferrer" target="_blank">https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel</a><br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div>--Kyle</div><div><br></div><div>Note:</div>If I've asked a question, and you're responding to me, please use *respond all*, so that other people can read any solutions we come to!</div><div><div><br></div></div></div></div></div></div></div>