PILog works

This commit is contained in:
2024-09-13 23:05:24 +03:00
parent 9a352bfc83
commit 7a945f47b1
3 changed files with 168 additions and 14 deletions

View File

@@ -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 ...";