Author: poeml Date: Fri Aug 28 04:13:19 2009 New Revision: 7780 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7780&view=rev Log: mirrorprobe: - no longer log to the console (stderr); this allows for running the script without redirection its output to /dev/null, which could mean swallowing important errors in the end. (Wanted to fix this since a long time, because I repeatedly ran into the situation - the intention was to do it in a different way (mail a strack trace via the log mechamism), but this will do.) Modified: trunk/mirrorprobe/mirrorprobe.py Modified: trunk/mirrorprobe/mirrorprobe.py URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mirrorprobe/mirrorprobe.py?rev=7780&r1=7779&r2=7780&view=diff ============================================================================== --- trunk/mirrorprobe/mirrorprobe.py (original) +++ trunk/mirrorprobe/mirrorprobe.py Fri Aug 28 04:13:19 2009 @@ -193,12 +193,12 @@ datefmt=DATEFORMAT, filename=options.logfile, filemode='a') - # to console - console = logging.StreamHandler() - console.setLevel(logging.getLevelName(options.loglevel)) - formatter = logging.Formatter(LOGFORMAT, DATEFORMAT) - console.setFormatter(formatter) - logging.getLogger('').addHandler(console) + ## to console + #console = logging.StreamHandler() + #console.setLevel(logging.getLevelName(options.loglevel)) + #formatter = logging.Formatter(LOGFORMAT, DATEFORMAT) + #console.setFormatter(formatter) + #logging.getLogger('').addHandler(console) # warnings will be mailed toaddrs = [ i.strip() for i in options.mailto.split(',') ] _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Fri Aug 28 2009 - 02:13:21 GMT
This archive was generated by hypermail 2.2.0 : Fri Aug 28 2009 - 02:45:14 GMT