Skip to content
/ logger Public

An interface to creating output with colors and saving outputs to log files with C++

License

Notifications You must be signed in to change notification settings

xaprier/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 logger

license

logger is an thread-safe interface to outputting with colors and saving outputs to log files with C++ if you enable logging to file.

🛠️ Build Instructions for Linux/UNIX

Clone the repository to your directory

git clone https://github.com/xaprier/logger.git

Enter the direcotry of the source code

cd logger/

Build the makefile with CMake, if you don't have cmake you have to install it.

cmake -G "Unix Makefiles" -B "build"

Than our Makefile is ready for build the source code. We have to access the directory of makefile and run make.

cd build && make -j$(nproc)

Than our compiled library is ready for run in the directory of the makefile with the name "Logger_simple_app" You can run the sample program with this command

./Logger_TEST

⛓ How to use in your project

You can use this project as an library to link your project with CMake.

  • Add the repository to any place where you put libs as an git submodule.
git submodule add https://github.com/xaprier/logger.git lib/logger # if you have lib directory in your project for an example
  • Add the project directory to your CMake project
add_subdirectory(lib/logger)
  • Link the library to your target
target_link_libraries(myproject PRIVATE Logger) # Logger is the project name in my CMake project.
  • Everything is complete, now you can use this project as a library in your project.

📚 Dependencies

  • CMake(Building project)
  • Git(Just for cloning repository)

About

An interface to creating output with colors and saving outputs to log files with C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published