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:
@@ -32,6 +32,7 @@ THE SOFTWARE.
|
|||||||
#include <Autolock.h>
|
#include <Autolock.h>
|
||||||
|
|
||||||
#define LOGGING 0
|
#define LOGGING 0
|
||||||
|
#define LOG_TO_STDERR 0
|
||||||
|
|
||||||
Report* Report::fInstance = NULL;
|
Report* Report::fInstance = NULL;
|
||||||
|
|
||||||
@@ -71,6 +72,10 @@ void Report::Add(kind kind, int32 page, const char* fmt, ...) {
|
|||||||
va_list list;
|
va_list list;
|
||||||
char *b = new char[1 << 16];
|
char *b = new char[1 << 16];
|
||||||
va_start(list, fmt);
|
va_start(list, fmt);
|
||||||
|
#if LOG_TO_STDERR
|
||||||
|
vfprintf(stderr, fmt, list);
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
#endif
|
||||||
vsprintf(b, fmt, list);
|
vsprintf(b, fmt, list);
|
||||||
AddItem(new ReportRecord(kind, page, "", b));
|
AddItem(new ReportRecord(kind, page, "", b));
|
||||||
delete b;
|
delete b;
|
||||||
|
|||||||
Reference in New Issue
Block a user