On Sun, Sep 9, 2018 at 4:23 PM Markus Metz <[email protected]> wrote: > On Sun, Sep 9, 2018 at 3:47 PM Markus Neteler <[email protected]> wrote: > > > > Hi, > > > > Why does G_message() print to stderr and not stdout? > > https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/error.c#L84 > > Messages, warnings and errors are not output. Consider g.region -g, r.info > -g, r.univar -g or any module that produces an output file with default > output=- meaning stdout. You don't want any messages in the output if the > output is to be automatically parsed later on.
OK, I see. So, for output like "Step X: processing ...:" I need to use print()? My preferred way would be grass.debug() because then I would later switch these message to level 1 in order to "hide" them. Yet, I think that they disappear... I'd also like to see a way to print through the parser, i.e. a functionality similiar to "sh -x shellscript" which prints every step. Is that possible? markusN _______________________________________________ grass-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-dev
