Revision e52efe453d9dd0d56acd2209d5eede01a6904fb9 authored by Tom Fischer on 31 March 2023, 12:59:18 UTC, committed by Tom Fischer on 31 March 2023, 12:59:18 UTC
Draft: Implement transformation from 'normal' `Mesh` to `NodePartitionedMesh`

See merge request ogs/ogs!4548
2 parent s 63a5ac5 + 576c9c3
Raw File
Logging.h
/**
 * \file
 *
 * \copyright
 * Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#pragma once

#include <spdlog/logger.h>

#include <memory>
#include <string>
#include <utility>

#include "baselib_export.h"

namespace BaseLib
{
extern BASELIB_EXPORT std::shared_ptr<spdlog::logger> console;
void setConsoleLogLevel(std::string const& level_string);
void initOGSLogger(std::string const& log_level);
}  // namespace BaseLib

template <typename... Args>
void DBUG(fmt::format_string<Args...> fmt, Args&&... args)
{
    BaseLib::console->debug(fmt, std::forward<Args>(args)...);
}
template <typename... Args>
void INFO(fmt::format_string<Args...> fmt, Args&&... args)
{
    BaseLib::console->info(fmt, std::forward<Args>(args)...);
}
template <typename... Args>
void WARN(fmt::format_string<Args...> fmt, Args&&... args)
{
    BaseLib::console->warn(fmt, std::forward<Args>(args)...);
}
template <typename... Args>
void ERR(fmt::format_string<Args...> fmt, Args&&... args)
{
    BaseLib::console->error(fmt, std::forward<Args>(args)...);
}
template <typename... Args>
void CRITICAL(fmt::format_string<Args...> fmt, Args&&... args)
{
    BaseLib::console->critical(fmt, std::forward<Args>(args)...);
}
back to top