3636#include < pdal/XMLSchema.hpp>
3737#endif
3838
39- using pdal::LogLevel;
40- using pdal::LogPtr;
4139using pdal::MetadataNode;
4240using pdal::PointId;
4341using pdal::PointViewSet;
@@ -64,14 +62,9 @@ PipelineExecutor::PipelineExecutor(string const& json, int level)
6462{
6563 setLogLevel (level);
6664
67- LogPtr log (pdal::Log::makeLog (" javapipeline" , &m_logStream));
68- log->setLevel (m_logLevel);
69- m_manager.setLog (log);
70-
7165 stringstream strm;
7266 strm << json;
7367 m_manager.readPipeline (strm);
74-
7568}
7669
7770bool PipelineExecutor::validate ()
@@ -123,7 +116,6 @@ string PipelineExecutor::getPipeline() const
123116 return strm.str ();
124117}
125118
126-
127119string PipelineExecutor::getMetadata () const
128120{
129121 if (!m_executed)
@@ -135,7 +127,6 @@ string PipelineExecutor::getMetadata() const
135127 return strm.str ();
136128}
137129
138-
139130string PipelineExecutor::getSchema () const
140131{
141132 if (!m_executed)
@@ -188,7 +179,6 @@ MetadataNode computePreview(Stage* stage)
188179 return summary;
189180}
190181
191-
192182string PipelineExecutor::getQuickInfo () const
193183{
194184
@@ -217,25 +207,18 @@ string PipelineExecutor::getQuickInfo() const
217207 return strm.str ();
218208}
219209
220- void PipelineExecutor::setLogStream (std::ostream& strm)
221- {
222-
223- LogPtr log (pdal::Log::makeLog (" javapipeline" , &strm));
224- log->setLevel (m_logLevel);
225- m_manager.setLog (log);
226- }
227-
228-
229210void PipelineExecutor::setLogLevel (int level)
230211{
231- if (level < static_cast < int >(LogLevel::Error) || level > static_cast < int >(LogLevel::None) )
232- throw java_error (" LogLevel should be between 0 and 9 " );
212+ if (level < 0 || level > 8 )
213+ throw java_error (" LogLevel should be between 0 and 8! " );
233214
234215 m_logLevel = static_cast <pdal::LogLevel>(level);
235- setLogStream (m_logStream);
216+
217+ pdal::LogPtr log (pdal::Log::makeLog (" javapipeline" , " stdlog" ));
218+ log->setLevel (m_logLevel);
219+ m_manager.setLog (log);
236220}
237221
238-
239222int PipelineExecutor::getLogLevel () const
240223{
241224 return static_cast <int >(m_logLevel);
0 commit comments