<commit_before>#include "utils/Log.h"

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

#ifdef __APPLE__
#include <asl.h>
#include <unistd.h>
#endif

#ifdef _WIN32
#include <windows.h>
#endif

namespace carto {

#ifdef __ANDROID__
    enum LogType { LOG_TYPE_FATAL = ANDROID_LOG_ERROR, LOG_TYPE_ERROR = ANDROID_LOG_ERROR, LOG_TYPE_WARNING = ANDROID_LOG_WARN, LOG_TYPE_INFO = ANDROID_LOG_INFO, LOG_TYPE_DEBUG = ANDROID_LOG_DEBUG };

    static void OutputLog(LogType logType, const std::string& tag, const char* text) {
        __android_log_print(static_cast<int>(logType), tag.c_str(), "%s", text);
    }
#endif
#ifdef __APPLE__
    enum LogType { LOG_TYPE_FATAL = ASL_LEVEL_EMERG, LOG_TYPE_ERROR = ASL_LEVEL_ERR, LOG_TYPE_WARNING = ASL_LEVEL_WARNING, LOG_TYPE_INFO = ASL_LEVEL_INFO, LOG_TYPE_DEBUG = ASL_LEVEL_DEBUG };

    static void OutputLog(LogType logType, const std::string& tag, const char* text) {
        asl_log(NULL, NULL, static_cast<int>(logType), "%s", text);
    }
#endif
#ifdef _WIN32
    enum LogType { LOG_TYPE_FATAL, LOG_TYPE_ERROR, LOG_TYPE_WARNING, LOG_TYPE_INFO, LOG_TYPE_DEBUG };
    
    static void OutputLog(LogType logType, const std::string& tag, const char* text) {
        OutputDebugStringA(text);
    }
#endif

    bool Log::IsShowError() {
        std::lock_guard<std::mutex> lock(_Mutex);
        return _ShowError;
    }

    void Log::SetShowError(bool showError) {
        std::lock_guard<std::mutex> lock(_Mutex);
        _ShowError = showError;
    }

    bool Log::IsShowWarn() {
        std::lock_guard<std::mutex> lock(_Mutex);
        return _ShowWarn;
    }
<commit_msg>Fix Windows Phone logging issue<commit_after>#include "utils/Log.h"

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

#ifdef __APPLE__
#include <asl.h>
#include <unistd.h>
#endif

#ifdef _WIN32
#include <windows.h>
#endif

namespace carto {

#ifdef __ANDROID__
    enum LogType { LOG_TYPE_FATAL = ANDROID_LOG_ERROR, LOG_TYPE_ERROR = ANDROID_LOG_ERROR, LOG_TYPE_WARNING = ANDROID_LOG_WARN, LOG_TYPE_INFO = ANDROID_LOG_INFO, LOG_TYPE_DEBUG = ANDROID_LOG_DEBUG };

    static void OutputLog(LogType logType, const std::string& tag, const char* text) {
        __android_log_print(static_cast<int>(logType), tag.c_str(), "%s", text);
    }
#endif
#ifdef __APPLE__
    enum LogType { LOG_TYPE_FATAL = ASL_LEVEL_EMERG, LOG_TYPE_ERROR = ASL_LEVEL_ERR, LOG_TYPE_WARNING = ASL_LEVEL_WARNING, LOG_TYPE_INFO = ASL_LEVEL_INFO, LOG_TYPE_DEBUG = ASL_LEVEL_DEBUG };

    static void OutputLog(LogType logType, const std::string& tag, const char* text) {
        asl_log(NULL, NULL, static_cast<int>(logType), "%s", text);
    }
#endif
#ifdef _WIN32
    enum LogType { LOG_TYPE_FATAL, LOG_TYPE_ERROR, LOG_TYPE_WARNING, LOG_TYPE_INFO, LOG_TYPE_DEBUG };
    
    static void OutputLog(LogType logType, const std::string& tag, const char* text) {
        OutputDebugStringA(text);
        OutputDebugStringA("\n");
    }
#endif

    bool Log::IsShowError() {
        std::lock_guard<std::mutex> lock(_Mutex);
        return _ShowError;
    }

    void Log::SetShowError(bool showError) {
        std::lock_guard<std::mutex> lock(_Mutex);
        _ShowError = showError;
    }

    bool Log::IsShowWarn() {
        std::lock_guard<std::mutex> lock(_Mutex);
        return _ShowWarn;
    }

{'fraction_non_alphanumeric': 0.11284513805522209, 'fraction_numerical': 0.0024009603841536613, 'mean_word_length': 4.282091917591125, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5075459', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1201, 'n_words': 249}