[pdal] logging
Pete Gadomski
pete.gadomski at gmail.com
Mon Oct 17 23:44:26 EDT 2011
> * if isDebug is not true for the stage, no debug info is output for that specific stage. We may want some sort of "globalDebug" option to turn isDebug on for every stage.
+1
On Mon, Oct 17, 2011 at 18:17, Michael P. Gerlek <mpg at flaxen.com> wrote:
> I'm not quite sure I understand the last paragraph... Will I be able to tell the reprojector to log very verbosely, but the stages before and after it to be relatively quiet?
>
> As for the MultiFilter: if merging two datasets wasn't such a common operation, I'd never have written that cursed filter... Perhaps you could take the average of all the inputs :-)
>
> -mpg
>
>
>
>> -----Original Message-----
>> From: pdal-bounces at lists.osgeo.org [mailto:pdal-bounces at lists.osgeo.org] On Behalf Of Howard Butler
>> Sent: Monday, October 17, 2011 1:35 PM
>> To: pdal at lists.osgeo.org
>> Subject: [pdal] logging
>>
>> All,
>>
>> I have committed a patch to PDAL to do provide debug logging output. We previously had the switches in place, but not the actual
>> logging mechanism. Here is a short summary of how it works:
>>
>> - StageBase has an implemented virtual log(std::ostringstream& input) (and another method that takes in a std::string and forwards it
>> for you) that issues the logging operation
>> - At initialize() time, a log is opened using the "log" option of the stage. For "stdlog" (std::clog), "stdout", (std::cout), and "stderr"
>> (std::cerr) options, these are simply initialized to be the streams for these standard outputs.
>> * For "log" options that were specified as a file, the log file is opened as an ostream *only* if the stage has no inputs -- i.e. it is a
>> Reader. All other stages ask down the pipeline to getLogger(), which just forwards the pointer to the ostream.
>> * What should we do for MultiFilters?
>> * if isDebug is not true for the stage, no debug info is output for that specific stage. We may want some sort of "globalDebug" option
>> to turn isDebug on for every stage.
>>
>> I initially was going to let stages themselves worry about verbosity and isDebug, but now that I write this email, I see that's not such a
>> good way to go. Expect the the method to change to log(std::ostringstream& input, int nVerbosity), and it will make sure to test the
>> stage's isDebug before actually writing data to the log. This way we don't have to litter the stage(s) with isDebug tests.
>>
>> Howard_______________________________________________
>> pdal mailing list
>> pdal at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pdal
>
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pdal
>
More information about the pdal
mailing list