qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-log: default to stderr for logging output


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] qemu-log: default to stderr for logging output
Date: Mon, 18 Feb 2013 11:46:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Peter Maydell <address@hidden> writes:

> On 13 February 2013 12:57, Markus Armbruster <address@hidden> wrote:
>>> -           "-d options   activate log (default logfile=%s)\n"
>>> -           "-D logfile   override default logfile location\n"
>>> +           "-d options   activate log (default is to log to stderr)\n"
>>> +           "-D logfile   write logs to 'logfile' rather than stderr\n"
>>>             "-p pagesize  set the host page size to 'pagesize'\n"
>>>             "-singlestep  always run in singlestep mode\n"
>>>             "-strace      log system calls\n"
>>
>> No need to mention the default twice.
>>
>> Pointing to -d help would be nice.
>
> Yeah. I'll standardise the phrasing here bsd-user, linux-user
> and system mode all say
>            "-d item1[,...]    enable logging of specified items\n"
>            "                  (use '-d help' for a list of log items)\n"
>            "-D logfile        write logs to 'logfile' (default stderr)\n"

Looks good.

>>> @@ -861,7 +858,9 @@ int main(int argc, char **argv)
>>>      }
>>>
>>>      /* init debug */
>>> -    qemu_set_log_filename(log_file);
>>> +    if (log_file) {
>>> +        qemu_set_log_filename(log_file);
>>> +    }
>>>      if (log_mask) {
>>>          int mask;
>>>
>>
>> Doesn't qemu_set_log_filename(NULL) do the right thing?
>
> Yes, it does. I'll drop this hunk.
>
>> bsd-user: if there's more than one -D, all but the last get silently
>> ignored.  We create that log file when logging is enabled.
>>
>> linux-user: we create all the log files when logging is enabled.
>>
>> No biggie, but consistency would be nice.  I prefer bsd-user's behavior.
>
> I agree, but I think changing the linux-user behaviour to
> match bsd-user should be a separate patch.

Makes sense.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]