---
+++
@@ -1,5 +1,6 @@
#!/usr/bin/python
import errno
+import logging
from Queue import Queue
import fuse
@@ -9,6 +10,9 @@
fuse.fuse_python_api = (0, 2)
CLIENT_COUNT = 16
+
+FORMAT='[%(process)d] %(message)s'
+logging.basicConfig(level=logging.DEBUG, format=FORMAT)
def dirFromList(list):
"""
@@ -74,14 +78,14 @@
return -e.errno
except Exception, e:
self.clients.put(client)
- print 'Caught exception:', e
+ logging.exception('Caught exception')
return -errno.EFAULT
self.clients.put(client)
print "remainging client:", self.clients.qsize()
args_str = ','.join([repr(a) for a in args])
- print "returning: %s(%s) -> %s" % (method_name, args_str, str(ret))
+ print "returning: %s(%s) -> %s" % (method_name, args_str, repr(ret))
return ret
if __name__ == '__main__':
Generated with KisssPM