unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: David Michael <fedora.dm0@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] dmd: Allow storing early logs before writing to disk
Date: Fri, 19 Sep 2014 09:57:32 +0200	[thread overview]
Message-ID: <87a95woxeb.fsf@gnu.org> (raw)
In-Reply-To: <CAEvUa7nXcknB7jP+g+W5yeRL50Tth09cfbiLH8fLS75_FnXGWQ@mail.gmail.com> (David Michael's message of "Wed, 17 Sep 2014 17:36:23 -0400")

David Michael <fedora.dm0@gmail.com> skribis:

> On Sat, Sep 13, 2014 at 8:16 AM, Ludovic Courtès <ludo@gnu.org> wrote:
>> David Michael <fedora.dm0@gmail.com> skribis:
>>> On Thu, Sep 11, 2014 at 10:31 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> [snip]
>>>> The ideal thing would be:
>>>>
>>>>   1. Run ‘dmd -l foo.log’.
>>>>   2. If foo.log is not writable, then make ‘log-output-port’ a string
>>>>      port.
>>>
>>> Do you think it makes sense to define log-output-port as a string port
>>> at first instead of a void port?
>>
>> No, because running dmd without ‘-l’ means disabling logging altogether,
>> hence the void port.
>
> That doesn't appear to be the case.  The main procedure in
> modules/dmd.scm is calling start-logging unconditionally, with the
> default log file if the option is omitted.

Oh indeed, you’re right.

[...]

>> So probably the patch you propose is the best approach.
>>
>> Then I would suggest a small change: instead of the magic
>> ‘--log-file=delayed’, what about adding a new option, say,
>> ‘--buffered-log’?  WDYT?
>
> Yes, I think a separate option would be better.  If it's expected that
> users will handle early mount configuration in their dmdconf.scm,
> separate options could allow doing something like specifying both
> options and starting to write to the given log file automatically
> after processing dmdconf.scm, if it wasn't started explicitly.  That
> could at least remove the need for the user to have to know to start
> logging themselves.

Rather, I would expect that the service that mounts the file system
/var/log is on would explicitly call ‘start-logging’ (because it could
be that things aren’t ready yet after dmdconf.scm has been loaded.)

> I haven't had a chance to try rewriting this yet, but I can send a new
> version when I do.

Great, thanks.

Ludo’.

      reply	other threads:[~2014-09-19  7:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 23:58 [PATCH] dmd: Allow storing early logs before writing to disk David Michael
2014-09-11 14:31 ` Ludovic Courtès
2014-09-12  2:09   ` David Michael
2014-09-13 12:16     ` Ludovic Courtès
2014-09-17 21:36       ` David Michael
2014-09-19  7:57         ` Ludovic Courtès [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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a95woxeb.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=fedora.dm0@gmail.com \
    --cc=guix-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).