mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add logger.print
This commit is contained in:
parent
3d7a9fd225
commit
3d6c1183c4
2 changed files with 12 additions and 1 deletions
|
|
@ -23,10 +23,16 @@ Logger::Logger(std::string name) : name(std::move(name)) {
|
|||
void Logger::log(
|
||||
LogLevel level, const std::string& name, const std::string& message
|
||||
) {
|
||||
if (level == LogLevel::print) {
|
||||
std::cout << "[" << name << "] " << message << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
using namespace std::chrono;
|
||||
|
||||
std::stringstream ss;
|
||||
switch (level) {
|
||||
case LogLevel::print:
|
||||
case LogLevel::debug:
|
||||
#ifdef NDEBUG
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue