Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Configuration: Debug

Komssys executable print an abundance of informative, warning and error messages to standard out, and this section controls this output individually for each executable.

Four error classes exist in the code: info, warn, error and fatal. The fatal error class can not be hidden, and when this fatal error occurs the program is terminate. For all other errors, the configuration file can be used to define whether the printing is allowed or forbidden on a per-file basis.

For this approach to work, the .cc file must include the following two lines:
#include "MNMsg.h"
MNMSG_USE("</tt>the_filename<tt>")

In the code, the macros MN_INFO, MN_WARN, MN_ERROR and MN_FATAL can then be used. The parameter of the macro is passed through ostream objects, and all formatting operations are allowed. To control which messages are printed, the section is used like this:

<system>
  <debug>
    <no-info-print />
    <no-warn-print />
    <error-print />
    <info-do>
      <file value="MNSelector" />
      <file value="MNThread" />
    </info-do>
    <warn-do>
      <file value="MNSelector" />
    </warn-do>
    <error-do />
    <info-dont />
    <warn-dont />
    <error-dont>
      <file value="MNSelector" />
    </error-dont>
  </debug>
</system>

The individual value are used as follows:


Generated on Sun Mar 6 13:36:23 2005 for Komssys by doxygen 1.3.8