Changeset 157 for trunk

Show
Ignore:
Timestamp:
11/11/08 14:16:00 (16 years ago)
Author:
broder
Message:

Use syslog instead of stdout in pyhesiodfs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/source/pyhesiodfs/pyHesiodFS.py

    r150 r157  
    1111 
    1212import sys, os, stat, errno 
     13from syslog import * 
    1314import fuse 
    1415from fuse import Fuse 
     
    5253    def __init__(self, *args, **kwargs): 
    5354        Fuse.__init__(self, *args, **kwargs) 
     55         
     56        openlog('pyhesiodfs', 0, LOG_DAEMON) 
     57         
    5458        try: 
    5559            self.fuse_args.add("allow_other", True) 
     
    107111                pointer = pointers[0] 
    108112                if pointer['type'] != 'AFS' and pointer['type'] != 'LOC': 
    109                     print >>sys.stderr, "Unknown locker type "+pointer.type+" for locker "+name+" ("+repr(pointer)+" )" 
     113                    syslog(LOG_NOTICE, "Unknown locker type "+pointer['type']+" for locker "+name+" ("+repr(pointer)+" )") 
    110114                    return None 
    111115                else: 
    112116                    self.mounts[name] = pointer['location'] 
    113                     print >>sys.stderr, "Mounting "+name+" on "+pointer['location'] 
     117                    syslog(LOG_INFO, "Mounting "+name+" on "+pointer['location']) 
    114118                    return pointer['location'] 
    115119            else: 
    116                 print >>sys.stderr, "Couldn't find filsys for "+name 
     120                syslog(LOG_WARNING, "Couldn't find filsys for "+name) 
    117121                return None 
    118122