[mapserver-users] perl mapscript
imap at chesapeake.net
imap at chesapeake.net
Mon Jun 24 14:17:54 PDT 2002
As far as perl mapscript logging goes, here is
a list of the tricks I use:
$ENV{MS_ERRORFILE} = "/var/log/mapserver.log"; # map engine error log
near the top of the perl mapscript code... before
you do your instantiate<sp> your map object.
This is an environment variable: MS_ERRORFILE
for the shell, or execution instance which catches
all of the errors/warning that occur within mapserver
and sends them to the filespec defined. This one is
the *most* useful log for debugging mapfile errors,
index problems, and mapserver internals, etc.
also in the mapfile, I setup a WEB object like this:
WEB
log "/var/log/mapserver_access.log
END
you could probably setup that variable in mapscript as well,
but I have always put it in the mapfile. It records a set
of variables similar to the apache access log for each
mapserver execution. Most useful for tracking/logging
mapserv requests/hits/parameters/extents/layers info.
typically, when I am debugging my perl mapscript, I refer to
the apache logs in /etc/httpd/logs/access_log and error_log
where the stdout and stderr stuff goes. With the combination
of these logfiles, I catch pretty much everything needed to
debug. If you mapscript blows up or you get a broken images,
just tail these files and you will see the perl error message
embedded in the access_log.
I am not familiar with the -w runtime though... I will give it
a try and see what it does.
Later dudes,
Chris Stuber (mapsurfer)
Lowell Filak wrote:
>
> Aside from the -w runtime option?
> Lowell F.
>
> The following message was sent by "Aaron D. Hunt" <hunt at zedxinc.com> on Mon, 24 Jun 2002 10:58:21 -0700.
>
> > Is there any way to get perl to print the mapscript warnings as well as > the errors?
> >
> > Aaron D. Hunt
> >
> >
More information about the MapServer-users
mailing list