VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
log.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
// Copyright 2025-2026 Arnis Lektauers
3
//
4
// Created by Arnis Lektauers on 18.07.2025.
5
//
6
7
#pragma once
8
9
#include <spdlog/spdlog.h>
10
#include <spdlog/sinks/stdout_color_sinks.h>
11
12
namespace
visutwin::canvas::log
13
{
14
inline
void
init
()
15
{
16
const
auto
logger = spdlog::stdout_color_mt(
"ecs"
);
17
spdlog::set_default_logger(logger);
18
spdlog::set_pattern(
"[%H:%M:%S.%e] [%^%l%$] %v"
);
19
spdlog::set_level(spdlog::level::info);
// default: info
20
}
21
22
inline
void
set_level_debug
()
23
{
24
spdlog::set_level(spdlog::level::debug);
25
}
26
27
inline
void
set_level_trace
()
28
{
29
spdlog::set_level(spdlog::level::trace);
30
}
31
}
visutwin::canvas::log
Definition
log.h:13
visutwin::canvas::log::init
void init()
Definition
log.h:14
visutwin::canvas::log::set_level_trace
void set_level_trace()
Definition
log.h:27
visutwin::canvas::log::set_level_debug
void set_level_debug()
Definition
log.h:22
log.h
Generated by
1.16.1