PILog works
This commit is contained in:
20
main.cpp
20
main.cpp
@@ -5,6 +5,7 @@
|
||||
#include "piintrospection_server.h"
|
||||
#include "piiostream.h"
|
||||
#include "pijson.h"
|
||||
#include "pilog.h"
|
||||
#include "pimathbase.h"
|
||||
#include "pip.h"
|
||||
#include "pivaluetree_conversions.h"
|
||||
@@ -67,6 +68,25 @@ protected:
|
||||
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
PILog log;
|
||||
log.setApplicationName("test");
|
||||
log.setDir("logs");
|
||||
// log.setTimestampFormat("hh-mm-ss");
|
||||
// log.setLineFormat("[c] m (t)");
|
||||
log.start();
|
||||
|
||||
// log.enqueue("debug msg");
|
||||
// log.enqueue("warn msg with ${c}", PILog::Category::Warning);
|
||||
// log.enqueue("ERROR${m}${t}", PILog::Category::Error);
|
||||
|
||||
log.debug(&log) << "some msg";
|
||||
piMSleep(50);
|
||||
log.warning() << "another!";
|
||||
piMSleep(50);
|
||||
log.error() << "blahblahblag";
|
||||
|
||||
// log.stop();
|
||||
return 0;
|
||||
/*PIPeer p("123");
|
||||
|
||||
piCout << "start ...";
|
||||
|
||||
Reference in New Issue
Block a user