Factor out SONAR_LOG
Reviewed By: passy Differential Revision: D9555739 fbshipit-source-id: 022763ea03047e1c4cd88d5f389b66be4cbe416b
This commit is contained in:
committed by
Facebook Github Bot
parent
243b4207e7
commit
9939a9e3bb
20
xplat/Sonar/Log.cpp
Normal file
20
xplat/Sonar/Log.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "Log.h"
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
namespace facebook {
|
||||
namespace sonar {
|
||||
|
||||
void log(const std::string& message) {
|
||||
#ifdef __ANDROID__
|
||||
__android_log_print(ANDROID_LOG_INFO, "sonar", "sonar: %s", message.c_str());
|
||||
#else
|
||||
printf("sonar: %s\n", message.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
} // namespace sonar
|
||||
} // namespace facebook
|
||||
Reference in New Issue
Block a user