Re: How to write verbose scripts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?ISO-8859-1?Q?BJ=F6rn_Lindqvist?=

    Re: How to write verbose scripts

    2008/9/3 Hendrik van Rooyen <mail@microcorp .co.za>:
    >
    Steven D'Aprano <stev...bersour ce.com.auwrote:
    >
    >>Is there a better way of doing this than the way I am going about it?
    >
    Not sure if its "better", but I would keep the messages in a table or dict and
    have different tables or dicts for different levels of verbosity, and write a
    displayer that knows about the verbosity - This approach has the advantage that
    you can write in English and have different verbosities in different languages
    too, if the displayer knows about the language.
    One big downside with that approach is that it becomes much harder to
    grep for the log message. Usually when I go through logs, I don't care
    what exactly the message says, just that it is easily googleable (uses
    some kind of identifying text) and that it is unique so I can know
    exactly where it was emitted.


    --
    mvh Björn
Working...