summaryrefslogtreecommitdiff
path: root/kernel/log.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-23 15:14:58 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-23 15:14:58 +0200
commit58367cd87a5d2bac1de81512f60939c080b3b9ef (patch)
tree88b50935d882964171602fcd3974489fadaa0070 /kernel/log.cc
parent19cff41eb4261b20374058f16807a229af46f304 (diff)
Removed compatbility.{h,cc}: Not using open_memstream/fmemopen anymore
Diffstat (limited to 'kernel/log.cc')
-rw-r--r--kernel/log.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/log.cc b/kernel/log.cc
index 2b4b5db5..1b0eb664 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -32,6 +32,7 @@
YOSYS_NAMESPACE_BEGIN
std::vector<FILE*> log_files;
+std::vector<std::ostream*> log_streams;
FILE *log_errfile = NULL;
SHA1 *log_hasher = NULL;
@@ -92,10 +93,16 @@ void logv(const char *format, va_list ap)
for (auto f : log_files)
fputs(time_str.c_str(), f);
+
+ for (auto f : log_streams)
+ *f << time_str;
}
for (auto f : log_files)
fputs(str.c_str(), f);
+
+ for (auto f : log_streams)
+ *f << str;
}
void logv_header(const char *format, va_list ap)
@@ -202,6 +209,9 @@ void log_flush()
{
for (auto f : log_files)
fflush(f);
+
+ for (auto f : log_streams)
+ f->flush();
}
void log_dump_val_worker(RTLIL::SigSpec v) {