adjusted logging only in debug
This commit is contained in:
@ -1,18 +1,26 @@
|
||||
//
|
||||
// Created by StanislausCichocki on 10.03.2025.
|
||||
//
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#ifdef NDEBUG // Release mode
|
||||
#define LOG_DEBUG_INFO(...)
|
||||
#define LOG_DEBUG_ERROR(...)
|
||||
#else
|
||||
#define LOG_DEBUG_INFO(...) spdlog::info(__VA_ARGS__)
|
||||
#define LOG_DEBUG_ERROR(...) spdlog::error(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#include "Surplus.h"
|
||||
#include "../model/Building.h"
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
|
||||
void Surplus::CalculateSurplus() {
|
||||
auto iterateFunc = Community::iterateBuildings(communities);
|
||||
auto modifyCommunity = [](Community &c) {
|
||||
spdlog::info("Calculating Surplus for Community: {}", c.name());
|
||||
LOG_DEBUG_INFO("Calculating Surplus for Community: {}", c.name());
|
||||
};
|
||||
auto modifyBuilding = [this](Building::Base &building) {
|
||||
spdlog::info("Calculating Surplus for Community: {}", building.metadata()->name());
|
||||
|
||||
Reference in New Issue
Block a user