aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2009-08-07 22:39:05 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2009-08-07 22:39:05 (GMT)
commitd3bd0c71cc6f8dfa6b7c93f19f9e605dfa438d81 (patch)
tree4b031b97f5b2c82912764cca530112e30e5b9e37
parent1e5fe982e61445f5335ec941b3f602d83fafedff (diff)
downloadfusearchive-d3bd0c71cc6f8dfa6b7c93f19f9e605dfa438d81.zip
fusearchive-d3bd0c71cc6f8dfa6b7c93f19f9e605dfa438d81.tar.gz
fusearchive-d3bd0c71cc6f8dfa6b7c93f19f9e605dfa438d81.tar.bz2
Added some logging
-rwxr-xr-xdump_chunkfile.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/dump_chunkfile.py b/dump_chunkfile.py
index 84fbfac..64b1af9 100755
--- a/dump_chunkfile.py
+++ b/dump_chunkfile.py
@@ -1,6 +1,13 @@
#!/usr/bin/env python
-import FuseArchive.ChunkFile, sys, re, os
+import FuseArchive.ChunkFile, sys, re, os, logging
+
+#log_level = logging.DEBUG
+log_level = logging.WARNING
+logging.basicConfig( level = log_level,
+ format = '%(asctime)s %(levelname)s %(filename)s:%(lineno)d %(module)s:%(funcName)s() %(message)s',
+ stream = sys.stderr,
+ filemode = 'w' )
# Run this in the storage area, basically 'cat' the file
file = re.sub( '^.*?tree', '', sys.argv[ 1 ] )
@@ -9,6 +16,7 @@ sys.stderr.write( "Opening file: %s\n" % file )
f = FuseArchive.ChunkFile.ChunkFile( file, os.O_RDONLY, 0 )
sys.stderr.write( "File is: %d bytes\n" % f.size )
+sys.stderr.write( "File has %d chunks\n" % len( f.chunks ) )
offset = 0
blocksize = 4096