>>> On 8/20/2007 at 4:21 AM, in message <[EMAIL PROTECTED]>, "Shaily Goel" <[EMAIL PROTECTED]> wrote: > hi > > Few questions regarding python sensor > > 1. How to log a message in python sensor?
Gmond doesn't provide an interface of its own for logging. However, python does have a very good interface for logging to syslog. If your module needs to write log messages, the syslog python interface would probably be the best option. > 2. how to raise exceptions in python sensor? For e.g in Drift sensor which > track changes in file/dir , if given file/folder do not exist it should throw > exception or log a error message Your module is responsible for handle any exceptions that it generates. There isn't any mechanism at a higher level to handle exception. Even if Gmond were to catch the exception, it wouldn't know what to do with a module specific exception anyway except to just throw it away continue on. > 3. Where are the logs corresponding to any metric is logged?? Are they > present at /var/log/messages file on Linux? > As mentioned before, there really isn't a logging mechanism in gmond. Gmond will log debug and error message to stderr if running in debug mode. It will also log some error message to syslog if daemonized. Brad ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
