#include "td/misc/Log.h"

#ifdef __ANDROID__
#include <android/log.h>
#else
#include <iostream>
#endif

namespace td {
namespace utils {

void LOG(const std::string& msg) {
#ifdef __ANDROID__
	__android_log_print(ANDROID_LOG_INFO, "TRACKERS", "%s", msg.c_str());
#else
	std::cout << msg << "\n";
#endif
}

void LOGD(const std::string& msg) {
#if !defined(NDEBUG)
	LOG(msg);
#endif
}

void LOGE(const std::string& err) {
#ifdef __ANDROID__
	__android_log_print(ANDROID_LOG_ERROR, "TRACKERS", "%s", err.c_str());
#else
	std::cerr << err << "\n";
#endif
}

}
} // namespace td
