This commit is contained in:
Oliver 2020-09-23 18:53:19 +02:00
parent 5810f83a0a
commit e71785a0c9
Signed by untrusted user: okaestne
GPG Key ID: 06A81B143EA9588F
3 changed files with 25 additions and 2 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
Log.o
*.o

View File

@ -1,12 +1,16 @@
TARGET = Log.o
TEST = test
CFLAGS = -O2 -std=c++11 -Wall -Wextra -pedantic-errors -g
.PHONY: all clean
all: $(TARGET)
test: $(TARGET) $(TEST).o
$(CXX) -o test $^
%.o: %.cpp
$(CXX) -c -o $@ $(CFLAGS) $^
clean:
$(RM) $(TARGET)
$(RM) $(TARGET) $(TEST) $(TEST).o

19
test.cpp Normal file
View File

@ -0,0 +1,19 @@
#include "Log.h"
int main() {
Log::init();
Log::setColoredOutput(true);
Log::fatal << "test: fatal";
Log::error << "test: error";
Log::warn << "test: warn";
Log::note << "test: note";
Log::info << "test: info";
Log::debug << "test: debug";
Log::trace << "test: trace";
Log::fatal << "test: fatal" << 2;
Log::error << "test: error" << 3 << '!';
// Log::stop();
}