aboutsummaryrefslogtreecommitdiffstats
path: root/fusearchive.py
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2009-07-28 15:23:06 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2009-07-28 15:23:06 (GMT)
commit5fe7faca8abf0671927d2d88a54e29f0caba0807 (patch)
treeb79ee32f8fca1e8ace349ba7beba1c010c59f46f /fusearchive.py
parentf750dafa081af1f5ab96f41262e9bb42d7528911 (diff)
downloadfusearchive-5fe7faca8abf0671927d2d88a54e29f0caba0807.zip
fusearchive-5fe7faca8abf0671927d2d88a54e29f0caba0807.tar.gz
fusearchive-5fe7faca8abf0671927d2d88a54e29f0caba0807.tar.bz2
Fix checking for debug level to output lots of data to use the logger level
Diffstat (limited to 'fusearchive.py')
-rwxr-xr-xfusearchive.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/fusearchive.py b/fusearchive.py
index ccfb384..65183b7 100755
--- a/fusearchive.py
+++ b/fusearchive.py
@@ -77,7 +77,7 @@ def _save_chunk_fs( chunk ):
return( [ 0, 0 ] )
logging.debug( "Begin save_chunk, length: " + str( len( chunk ) ) )
- if debug_level > 4:
+ if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
logging.debug( "Chunk: " + str( chunk ) )
# Save this hash string, similar to the backuppc algo
@@ -140,7 +140,7 @@ def _save_chunk_zip( chunk ):
return( [ 0, 0 ] )
logging.debug( "Begin save_chunk, length: " + str( len( chunk ) ) )
- if debug_level > 4:
+ if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
logging.debug( "Chunk: " + str( chunk ) )
# Save this hash string, similar to the backuppc algo
@@ -225,7 +225,7 @@ def _load_chunk_fs( key ):
else:
raise IOError
- if debug_level > 4:
+ if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
logging.debug( "Load-Chunk: " + str( chunk ) )
return chunk
@@ -257,7 +257,7 @@ def _load_chunk_zip( key ):
z.close()
raise IOError
- if debug_level > 4:
+ if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
logging.debug( "Load-Chunk: " + str( chunk ) )
z.close()
@@ -664,7 +664,7 @@ class FuseArchive(Fuse):
logging.debug( " chunk offset: " + str(rest) )
- if debug_level > 4:
+ if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
logging.debug( "Pre-Buf: " + str(buf) )
logging.debug( "Pre-Chunk: " + str(self.chunk) )
@@ -677,7 +677,7 @@ class FuseArchive(Fuse):
buf[ buf_offset:(buf_offset+this_len) ] + \
self.chunk[ (rest + this_len): ]
- if debug_level > 4:
+ if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
logging.debug( "Post-Buf: " + str(buf) )
logging.debug( "Post-Chunk: " + str(self.chunk) )
@@ -781,7 +781,7 @@ class FuseArchive(Fuse):
self._load_chunk( 0 )
- pdb.set_trace()
+ #pdb.set_trace()
if need_chunks == 0:
logging.debug( "Creating 0 chunk file" )
self.chunks = []