Added option to log to stderr.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4759 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8ce7304896
commit
64200a77db
@ -32,6 +32,7 @@ THE SOFTWARE.
|
||||
#include <Autolock.h>
|
||||
|
||||
#define LOGGING 0
|
||||
#define LOG_TO_STDERR 0
|
||||
|
||||
Report* Report::fInstance = NULL;
|
||||
|
||||
@ -71,6 +72,10 @@ void Report::Add(kind kind, int32 page, const char* fmt, ...) {
|
||||
va_list list;
|
||||
char *b = new char[1 << 16];
|
||||
va_start(list, fmt);
|
||||
#if LOG_TO_STDERR
|
||||
vfprintf(stderr, fmt, list);
|
||||
fprintf(stderr, "\n");
|
||||
#endif
|
||||
vsprintf(b, fmt, list);
|
||||
AddItem(new ReportRecord(kind, page, "", b));
|
||||
delete b;
|
||||
|
Loading…
x
Reference in New Issue
Block a user