From aa82dc64b397b6ca0d336d91638d4f4b849e3667 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 26 Jun 2007 05:10:58 +0000 Subject: Fixed a minor bug in FString, and added the Logger and a test...it's cool, and a decent replacement for multilog now that we use runit. --- src/tests/logger.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/tests/logger.cpp (limited to 'src/tests') diff --git a/src/tests/logger.cpp b/src/tests/logger.cpp new file mode 100644 index 0000000..a271443 --- /dev/null +++ b/src/tests/logger.cpp @@ -0,0 +1,28 @@ +#include "bu/logger.h" +#include +#include + +class Thing +{ + public: + Thing() + { + lineLog( 2, "Want a thing?"); + } + + void go( int i ) + { + lineLog( 1, "GO!!!!"); + } +}; + +int main() +{ + setLogLevel( 4 ); + setLogFormat("%L: %y-%m-%d %h:%M:%s %f:%l:%F: %t"); + lineLog( 5, "Hey, error: %s", strerror( errno ) ); + + Thing gh; + gh.go( 6); +} + -- cgit v1.2.3