[GRASS-user] Different GIS_ERROR_LOG files for different instances of GRASS?

Glynn Clements glynn at gclements.plus.com
Tue Oct 7 18:53:24 EDT 2008


Markus Neteler wrote:

> > I am running simulations which are using GRASS for some calculations,
> > and I would like to use GIS_ERROR_LOG as a log file. How can I have
> > different GIS_ERROR_LOG for different instances of GRASS, so that each
> > instance has it's own log file?
> 
> Best might be to change the name "GIS_ERROR_LOG" which is defined in
> lib/gis/error.c
> 
> into a variable.
> ?

Done in 7.0 (r33740).

If set, $GIS_ERROR_LOG should be the absolute path to the log file (a
relative path will be interpreted relative to the process' cwd, not
the cwd at the point you set the variable). If not set,
$HOME/GIS_ERROR_LOG is used instead.

The previous behaviour of writing to both $HOME/GIS_ERROR_LOG and
$GISBASE/GIS_ERROR_LOG has been eliminated; only one log file will be
written.

As before, the file will only be used if it already exists.

Also, the current directory is obtained using getcwd() rather than
popen("pwd"), so it should work on Windows.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list