#include "logger.hpp"

Logger::Logger()
{
	if(pthread_create(&thread_handle,
		          NULL,
		          _static_run,
			  this) != 0) {
		std::cout << "failed to ctrate logger tast!" <<std::endl;
		exit(-1);
	}
}

pthread_t Logger::get_thread_handle()
{
	return thread_handle;
}


void Logger::_run()
{
	while(1) {
		usleep(10000);
	}
}

void Logger::_static_run(void* arg)
{
	reinterpret_cast<Logger*>(arg)->_run();
}



