tlog: update tlog

This commit is contained in:
Nick Peng
2020-08-13 01:23:40 +08:00
parent da74e877c5
commit c380bbe0e3
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
/*
* tinylog
* Copyright (C) 2018-2019 Nick Peng <pymumu@gmail.com>
* Copyright (C) 2018-2020 Nick Peng <pymumu@gmail.com>
* https://github.com/pymumu/tinylog
*/
#ifndef _GNU_SOURCE

View File

@@ -1,6 +1,6 @@
/*
* tinylog
* Copyright (C) 2018-2019 Ruilin Peng (Nick) <pymumu@gmail.com>
* Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>
* https://github.com/pymumu/tinylog
*/
@@ -196,6 +196,7 @@ public:
Buffer LogStream(tlog_level level, const char *file, int line, const char *func, void *userptr) {
return Buffer(new Stream, [=](Stream *st) {
tlog_ext(level, file, line, func, userptr, "%s", st->str().c_str());
delete st;
});
}
};
@@ -215,6 +216,7 @@ public:
Buffer Out(tlog_log *log) {
return Buffer(new Stream, [=](Stream *st) {
tlog_printf(log, "%s", st->str().c_str());
delete st;
});
}
};