From: Stefan S. <se...@sy...> - 2006-03-28 14:51:08
|
Tony Graham wrote: > As threatened, I have added "warning mode" to FoLibfoContext so you can select > to suppress certain types of warnings. > > xmlroff now defaults to setting "warning mode" so it suppresses "unsupported > property" messages (which makes redundant a large part of libfo-compat.xsl). Awesome ! > You can currently set the warning mode on the xmlroff command line using '-w > <integer>', similarly to how you can set the debug level. > > Magic numbers for debug level is fine (or, at least, not too bad) since if > you're debugging, you're going to be exposed to all sorts of gory details > anyway. > > Magic numbers for warning mode seems less fine, since even casual users might > want to set the warning mode. I think this is fine, even for casual users, as long as the various levels are well documented (for example in the 'xmlroff --help' message). That said, I think textual mode attributes are fine, too. In particular, if they can be accumulate, such as in 'xmlroff -w fo -w property ...'. For the actual messages please keep in mind that these may be used for regression tests, so it would be good to avoid any runtime data such as process-ids, dates, etc. In fact, if these messages have some substructure (e.g. start with the line in the input at which the problem occured, it might be good to formalize the message structure to allow third party tools to develop parsers so xmlroff can be wrapped in a gui. (I'm thinking in particular of gcc's errors / warnings, and how these can be transformed into links in an emacs or eclipse console...) Regards, Stefan |