added prefixVerbosity value. in a low verbosity setting no time-stamp

prefix is displayed
This commit is contained in:
darkeye 2000-12-20 12:47:40 +00:00
parent 2b05be870a
commit a7f3efde10
1 changed files with 17 additions and 5 deletions

View File

@ -93,18 +93,26 @@ class Reporter
*/ */
static ostream * os; static ostream * os;
/**
* Print timestamp for every report only if verbosity level
* is above this value.
*/
static const unsigned int prefixVerbosity = 3;
/** /**
* Print a prefix to each report. * Print a prefix to each report.
*/ */
void void
printPrefix( void ) throw () printPrefix( void ) throw ()
{ {
char str[32]; if ( verbosity > prefixVerbosity ) {
time_t now; char str[32];
time_t now;
now = time(NULL); now = time(NULL);
strftime( str, 32, "%H:%M:%S: ", localtime(&now) ); strftime( str, 32, "%H:%M:%S: ", localtime(&now) );
(*(Reporter::os)) << str; (*(Reporter::os)) << str;
}
} }
@ -299,6 +307,10 @@ class Reporter
$Source$ $Source$
$Log$ $Log$
Revision 1.3 2000/12/20 12:47:40 darkeye
added prefixVerbosity value. in a low verbosity setting no time-stamp
prefix is displayed
Revision 1.2 2000/11/18 11:12:01 darkeye Revision 1.2 2000/11/18 11:12:01 darkeye
added timestamp display, removed process id display in reports added timestamp display, removed process id display in reports
changed reportEvent functions to template functions changed reportEvent functions to template functions