Skip to content
/ Logger Public

Modern C++ Logger - Modern, Generic, Sacalability and Tested

Notifications You must be signed in to change notification settings

JakeAbo/Logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logger

Modern C++ Logger - Logger developed above Windows OS using visual studio 2019 IDE with Modern C++ 17. Support different severity levels, auto, generic, scalable and easy to use logger. The module is tested.


Author: Jack Abulafia

Dependencies

The library requires no dependencies.

Building

The library is header-only.

How to use

  1. Clone the repository.
  2. Run the main which run the tester and check everything is passed.

Getting Started

Pre-defined Macros in Log.hpp makes usage easier:

#define LOG_INFO	Log(__FILE__, __LINE__, __FUNCTION__).info()
#define LOG_NOTICE	Log(__FILE__, __LINE__, __FUNCTION__).notice()
#define LOG_DEBUG	Log(__FILE__, __LINE__, __FUNCTION__).debug()
#define LOG_ERROR	Log(__FILE__, __LINE__, __FUNCTION__).error()

And you can use it like:

#include "Log.hpp"

void example()
{
	LOG_INFO	<< "hello" << std::endl;
	LOG_NOTICE	<< "hello" << std::endl;
	LOG_DEBUG	<< "hello" << std::endl;
	LOG_ERROR	<< "hello" << std::endl;
}

Notice: you should always end with std::endl which simply push the msg to the queue.

License

This project is open source and freely available.

Copyright (c) 2020, Jack Abulafia All rights reserved.

About

Modern C++ Logger - Modern, Generic, Sacalability and Tested

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages