Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
thi8v authored Jun 16, 2022
1 parent 3380a08 commit db6d744
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# lwlogger

Lwlogger is a C++ lightweight logger hence its name. With it you could debug your programs, save a trace of your programs and resolve bugs.

## How to use it ?

### Code

Just put the librairie and `logger.hpp` next to your executable. Include `logger.hpp`, where you want to use it. Or there is a test program you can go see it, if you want more details. When you initialize the logger, you just put the folder name followed by a `/`.

#### Example :
```cpp
#include "logger.hpp"

int main()
{
Logger logger("logs/");

logger.info("This is a test");

return 0;
}
```

### Result

In the terminal, the result is like that :
```
[11:26:15] [INFO] This is a test
```

And in the folder you have a file named with the following schematic `dd/mm/yyyy_hh:mm:ss.log`.

### Compile

With G++ you can compile your program like that : `g++ <main_cpp_file> lwlogger.dll -o <name_program>`

You can compile the lib if you want with this command `g++ -Wall -shared src/logger.cpp -o lwlogger.dll` at the root of the project !

## Your way to thank me
If you want to thank me, you can use this program, put a star and tell your friends about lwlogger!

0 comments on commit db6d744

Please sign in to comment.