[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [php-weathermap] Best method to silence Errors?



On 06/10/2010 11:41 AM, Howard Jones wrote:
On 10/06/2010 16:32, Patrick wrote:
On 06/10/2010 11:26 AM, Howard Jones wrote:
On 10/06/2010 16:14, Patrick wrote:
Hey all,
I've gotten weathermap running along happily, but due to an error retrieving data last night, weathermap had a bit of a hissy fit and threw a ton of errors until the issue was resolved.

The issue was detected via another method and the error messages didn't provide any insight into the issue.

Is there a config option/parameter to make it run in silent mode and suppress any messages?

The obvious answer is to fix the error :-)

Well, if it's in crontab, add
 2>&1 > /dev/null
to the end of the line. But then you'll never know you have a problem.

What kind of errors though? I'm always keen to improve error messages...

Howie

WARNING: configs/networkmap: ReadData: LINK procurve-3-procurve-4, target: /var/lib/hobbit/rrd/procurve-3/if_load.48.rrd:ds0:ds1 on config line 118 of configs/networkmap had no valid data, according to WeatherMapDataSource_rrd

We had an issue where data collection crashed.

I know about dumping it to /dev/null, but I have always considered that cludgey and you can run into other issues with it. If there's no options in the program, I guess that's the best solution though.
I've only added nowarn for certain errors where there are sometimes good reasons to cause the error, and you wanted to avoid the extra 'noise'. I *would* have said that I couldn't think of a situation for that particular error where I didn't want to know about it, but I guess you have one.

It probably wouldn't be that hard to add in something to disable any warning, based on the error code [WMRRD03], so you could then say
 SET nowarn_WMRRD03 1
to silence particular messages.

Sound reasonable?
That would be very useful. Also, perhaps a list of the error messages or get it printed on the error line somewhere?
Copyright 1994-2005, by Howard Jones. howie@thingy.com