aboutsummaryrefslogtreecommitdiff
path: root/src/example/log.cpp
blob: 3bc6d80dd935173556faaa4c71ddd14ca37c765e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/** \file
 * 
 * Standalone example for usage of the logging functions
 */

#include <crepe/api/Config.h>
#include <crepe/util/log.h>

using namespace crepe;
using namespace crepe::util;

int main() {
	auto & cfg = api::Config::get_instance();
	// make sure all log messages get printed
	cfg.log.level = util::LogLevel::TRACE;

	dbg_trace();
	dbg_logf("cfg.log.color is equal to %d", cfg.log.color);
	logf(LogLevel::INFO, "info message!");
	logf(LogLevel::WARNING, "very scary warning");
	logf(LogLevel::ERROR, "fatal error!!!");

	return 0;
}