Revision 2452
Added by Aaron Marcuse-Kubitza over 12 years ago
map | ||
---|---|---|
111 | 111 |
sql.run_raw_query.debug = debug |
112 | 112 |
def log(msg, level=1): |
113 | 113 |
'''Higher level -> more verbose''' |
114 |
if level <= verbosity: sys.stderr.write(msg+'\n') |
|
114 |
if level <= verbosity: |
|
115 |
if level > 1: msg = '['+str(level)+'] '+msg # include level in msg |
|
116 |
sys.stderr.write(msg+'\n') |
|
115 | 117 |
if debug: log_debug = lambda msg, level=2: log(msg, level) |
116 | 118 |
else: log_debug = sql.log_debug_none |
117 | 119 |
|
Also available in: Unified diff
bin/map: Logging: Print debug messages (level > 1) prefixed with their level, to distinguish higher- and lower-level debug messages