summaryrefslogtreecommitdiff
path: root/src/python/swig/trace.i
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/swig/trace.i')
-rw-r--r--src/python/swig/trace.i12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/python/swig/trace.i b/src/python/swig/trace.i
index 3b049a3d6..6525b3e51 100644
--- a/src/python/swig/trace.i
+++ b/src/python/swig/trace.i
@@ -33,17 +33,25 @@
%{
#include "base/trace.hh"
#include "base/types.hh"
+#include "base/output.hh"
inline void
output(const char *filename)
{
- Trace::setOutput(filename);
+ std::ostream *file_stream = simout.find(filename);
+
+ if (!file_stream)
+ file_stream = simout.create(filename);
+
+ Trace::setDebugLogger(new Trace::OstreamLogger(*file_stream));
}
inline void
ignore(const char *expr)
{
- Trace::ignore.setExpression(expr);
+ ObjectMatch ignore(expr);
+
+ Trace::getDebugLogger()->setIgnore(ignore);
}
using Trace::enabled;