Add Pal::message. (#467)
This provides a single place for reporting messages to the user. While here, be consistent about using stderr for things that should go to stderr. We were previously using a mix of stderr and stdout.
This commit is contained in:
@@ -19,7 +19,7 @@ namespace snmalloc
|
||||
{ \
|
||||
current_test = __PRETTY_FUNCTION__; \
|
||||
MessageBuilder<1024> mb{"Starting test: " msg "\n", ##__VA_ARGS__}; \
|
||||
fputs(mb.get_message(), stderr); \
|
||||
Pal::message(mb.get_message()); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@ namespace snmalloc
|
||||
do \
|
||||
{ \
|
||||
MessageBuilder<1024> mb{msg "\n", ##__VA_ARGS__}; \
|
||||
fputs(mb.get_message(), stderr); \
|
||||
Pal::message(mb.get_message()); \
|
||||
} while (0)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user