Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #802

Re: How to implement diagnostic messages?

From BGB <cr88192@hotmail.com>
Newsgroups comp.programming
Subject Re: How to implement diagnostic messages?
Date 2011-09-08 14:14 -0700
Organization albasani.net
Message-ID <j4bb79$md8$1@news.albasani.net> (permalink)
References <4e68c9ed$0$31290$a729d347@news.telepac.pt> <j4avm5$rgi$1@news.albasani.net> <0.b0949c082ff78afb7a77.20110908205335BST.878vpy4xq8.fsf@bsb.me.uk>

Show all headers | View raw


On 9/8/2011 12:53 PM, Ben Bacarisse wrote:
> BGB<cr88192@hotmail.com>  writes:
>
>> On 9/8/2011 6:58 AM, Rui Maciel wrote:
>>> In some applications it's useful to have, at least in the development
>>> stages, a way to output diagnostic messages in order to help developers
>>> check what's happening under the hood.  Yet, although this can be useful and
>>> in some times even invaluable, there isn't much information on what are
>>> considered to be good practices regarding the implementation of diagnostic
>>> messages.
>>>
>>> With this in mind, what are your views on how to implement diagnostic
>>> messages?  Are simple outputs to stderr enough or are there better ways to
>>> handle this?
>>>
>>
>> the great problems with stderr:
>> the messages are not recorded anywhere (can't look over them in more
>> detail later);
>> in graphical and/or GUI applications, stdout and stderr tend to go
>> nowhere, so anything sent there is not visible.
>
> These are problems with you platform, not with stderr per se.  I can
> view output from GUI programs just fine and I can save the output for
> later study.
>
> <snip>

I develop primarily on Windows, and using MSVC on this target, which I 
would guess is a fairly common use-case.

the issue is, however, that GUI apps seem to discard both stdout and 
stderr, making them not useful on this target (and hence log files are 
far more preferable).

even in console apps, log files may still be preferable, given the 
console only has so many lines of text.


on Linux, unless one runs a GUI app from the console, they will still 
not see the console output, hence log-files are still useful here (and 
don't require mucking around with command-line options or other things 
to save the output).

...

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to implement diagnostic messages? Rui Maciel <rui.maciel@gmail.com> - 2011-09-08 14:58 +0100
  Re: How to implement diagnostic messages? BGB <cr88192@hotmail.com> - 2011-09-08 10:57 -0700
    Re: How to implement diagnostic messages? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-08 20:53 +0100
      Re: How to implement diagnostic messages? BGB <cr88192@hotmail.com> - 2011-09-08 14:14 -0700
        Re: How to implement diagnostic messages? "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2011-09-09 09:30 +0200
    Re: How to implement diagnostic messages? Rui Maciel <rui.maciel@gmail.com> - 2011-09-11 18:27 +0100
      Re: How to implement diagnostic messages? BGB <cr88192@hotmail.com> - 2011-09-11 11:44 -0700
  Re: How to implement diagnostic messages? Ian Collins <ian-news@hotmail.com> - 2011-09-09 10:33 +1200
    Re: How to implement diagnostic messages? Rui Maciel <rui.maciel@gmail.com> - 2011-09-11 18:33 +0100
  Re: How to implement diagnostic messages? James Waldby <not@valid.invalid> - 2011-09-10 00:17 +0000
    Re: How to implement diagnostic messages? Rui Maciel <rui.maciel@gmail.com> - 2011-09-11 18:41 +0100
      Re: How to implement diagnostic messages? BGB <cr88192@hotmail.com> - 2011-09-11 11:48 -0700
        Re: How to implement diagnostic messages? Ian Collins <ian-news@hotmail.com> - 2011-09-12 08:47 +1200
          Re: How to implement diagnostic messages? BGB <cr88192@hotmail.com> - 2011-09-11 14:56 -0700
            Re: How to implement diagnostic messages? Ian Collins <ian-news@hotmail.com> - 2011-09-12 15:00 +1200

csiph-web