<commit_before>/*
 * This file is part of the IAN project - https://github.com/Meoo/IAN
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include <spdlog/spdlog.h>


#define IAN__LOG_WRAP(x) do{ x ;}while((void)0,0)

#ifdef NDEBUG
#define IAN_TRACE(logger, ...) IAN__LOG_WRAP()
#define IAN_DEBUG(logger, ...) IAN__LOG_WRAP()
#else
#define IAN_TRACE(logger, ...) IAN__LOG_WRAP(logger->trace(__VA_ARGS__))
#define IAN_DEBUG(logger, ...) IAN__LOG_WRAP(logger->debug(__VA_ARGS__))
#endif

#define IAN_INFO(logger, ...) IAN__LOG_WRAP(logger->info(__VA_ARGS__))
#define IAN_WARN(logger, ...) IAN__LOG_WRAP(logger->warn(__VA_ARGS__))
#define IAN_ERROR(logger, ...) IAN__LOG_WRAP(logger->error(__VA_ARGS__))
#define IAN_CRITICAL(logger, ...) IAN__LOG_WRAP(logger->critical(__VA_ARGS__))<commit_msg>Guard variable in log macros<commit_after>/*
 * This file is part of the IAN project - https://github.com/Meoo/IAN
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include <spdlog/spdlog.h>


#define IAN__LOG_WRAP(x) do{ x ;}while((void)0,0)

#ifdef NDEBUG
#define IAN_TRACE(logger, ...) IAN__LOG_WRAP()
#define IAN_DEBUG(logger, ...) IAN__LOG_WRAP()
#else
#define IAN_TRACE(logger, ...) IAN__LOG_WRAP((logger)->trace(__VA_ARGS__))
#define IAN_DEBUG(logger, ...) IAN__LOG_WRAP((logger)->debug(__VA_ARGS__))
#endif

#define IAN_INFO(logger, ...) IAN__LOG_WRAP((logger)->info(__VA_ARGS__))
#define IAN_WARN(logger, ...) IAN__LOG_WRAP((logger)->warn(__VA_ARGS__))
#define IAN_ERROR(logger, ...) IAN__LOG_WRAP((logger)->error(__VA_ARGS__))
#define IAN_CRITICAL(logger, ...) IAN__LOG_WRAP((logger)->critical(__VA_ARGS__))
{'fraction_non_alphanumeric': 0.15966822187662, 'fraction_numerical': 0.006220839813374806, 'mean_word_length': 5.126984126984127, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '4875168', 'n_tokens_mistral': 748, 'n_tokens_neox': 716, 'n_words': 161}