Skip to content

Commit fdd8a57

Browse files
committed
Debug.
1 parent 548b704 commit fdd8a57

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pdal/filters/PythonFilter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ void PythonFilter::ready(PointTableRef table)
130130
if (m_args->m_source.empty())
131131
m_args->m_source = FileUtils::readFileIntoString(m_args->m_scriptFile);
132132
std::ostream *out = log()->getLogStream();
133+
std::cerr << "Just writing to output!\n";
134+
std::cerr << "Output = " << out << "!\n";
135+
*out << "Writing to output!\n";
136+
std::cerr << "Done writing to output!\n";
133137
plang::EnvironmentPtr env = plang::Environment::get();
134138
env->set_stdout(out);
135139
m_script.reset(new plang::Script(m_args->m_source, m_args->m_module,

pdal/plang/Redirector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ PyObject* Redirector::init()
171171

172172
void Redirector::set_stdout(std::ostream* ostr)
173173
{
174-
stdout_write_type writeFunc = [ostr](std::string msg) { *ostr << msg; };
174+
stdout_write_type writeFunc = [ostr](std::string msg) { std::cerr << "Ostr = " << ostr << "!\n"; *ostr << msg; };
175175
stdout_flush_type flushFunc = [ostr]{ ostr->flush(); };
176176

177177
this->set_stdout(writeFunc, flushFunc);

0 commit comments

Comments
 (0)