From: Junio C Hamano <gitster@pobox.com>
To: "Stephen R. van den Berg" <srb@cuci.nl>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3] git-daemon: logging done right
Date: Wed, 13 Aug 2008 16:13:32 -0700 [thread overview]
Message-ID: <7vmyjgjyoz.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080813084330.30845.89753.stgit@aristoteles.cuci.nl> (Stephen R. van den Berg's message of "Wed, 13 Aug 2008 10:43:31 +0200")
"Stephen R. van den Berg" <srb@cuci.nl> writes:
> Make git-daemon a proper syslogging citizen with PID-info.
In general, please try to avoid using the wording like that in the commit
log message, _without_ defining what you think is the proper way and why
you think the current behaviour is improper.
Do you mean "if we use syslog(), we can ask it to add pid information to
the output and we do not have to prepend pid information ourselves"?
For the same reason, "logging done right" is somewhat a suboptimal title
for the patch. If the title describes concisely the reason why the new
way was chosen by you over the old way, and the readers can judge for
themselves if they agree with your reasoning and if the new way is better.
For example, you could have said "git-daemon: let syslog() to add our pid
to the messages".
Yes, it is _not_ the only change you are making with this patch, and the
example message won't describe what you did fully. It may be an
indication that you are doing too many things in one patch, unless other
changes are "well, they are not a big deal but while we are at it why not
fix them" kind of changes.
> Simplify the overzealous double buffering in the logroutine.
Is there any overzealous double buffering involved? I thought it just
does s*printf() twice into the single buf[]? Are you referring to the
trick of setting stderr to line-buffered output? It does remove the need
for these two s*printf(), and is an improvement.
I am however not as sure as you seem to be that these two changes make the
difference between "done right" and "done wrong" --- at most I'd say that
these fall into "improve the way the log is done" category.
> Call logerror() instead of error().
Calls to die() are covered by setting die-routine to daemon_die(), but the
error() calls are lost to bitbucket. This is a real fix to keep otherwise
lost error message to the log stream.
Don't you want to also send the "poll failed" error to the log stream as
well?
Thanks.
prev parent reply other threads:[~2008-08-13 23:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 8:43 [PATCH 1/3] git-daemon: logging done right Stephen R. van den Berg
2008-08-13 8:43 ` [PATCH 2/3] git-daemon: make the signal handler almost a no-op Stephen R. van den Berg
2008-08-14 0:09 ` Junio C Hamano
2008-08-14 0:18 ` Stephen R. van den Berg
2008-08-14 1:09 ` Junio C Hamano
2008-08-14 7:47 ` Stephen R. van den Berg
2008-08-14 8:26 ` Junio C Hamano
2008-08-14 10:13 ` Stephen R. van den Berg
2008-08-14 13:41 ` Johannes Schindelin
2008-08-13 8:43 ` [PATCH 3/3] git-daemon: rewrite kindergarden Stephen R. van den Berg
2008-08-13 8:58 ` Stephen R. van den Berg
2008-08-13 9:00 ` [PATCH] " Stephen R. van den Berg
2008-08-13 10:40 ` [PATCH] git-daemon: rewrite kindergarden, new option --max-connections Stephen R. van den Berg
2008-08-13 9:05 ` [PATCH 3/3] git-daemon: rewrite kindergarden Petr Baudis
2008-08-13 10:37 ` Stephen R. van den Berg
2008-08-13 23:13 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vmyjgjyoz.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=srb@cuci.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).