Skip to content

A simple C++17 logger design which can be used in Windows and Linux.

License

Notifications You must be signed in to change notification settings

fotolist/MtLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MtLogger

A simple C++17 logger design which can be used in Windows and Linux.

Basic Usage:

#include "MtLogger.h"

using namespace NS_MtLogger;

void LogTestThread()
{
	for (int i = 0; i < 100; i++)
	{
		MtLogger::WriteLogFile(L"Thread 2 msg " + std::to_wstring(i + 1), L"Test", MsgLvl::I);
		std::this_thread::sleep_for(std::chrono::milliseconds(100));
	}
}

int main()
{
	MtLogger mtLoggerAny;

	std::thread t1(LogTestThread);
	t1.detach();

	for (int i = 0; i < 100; i++)
	{
		MtLogger::WriteLogFile(L"Thread 1 msg " + std::to_wstring(i + 1), L"Test", MsgLvl::I);
		std::this_thread::sleep_for(std::chrono::milliseconds(100));
	}
	return 0;
}

About

A simple C++17 logger design which can be used in Windows and Linux.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages