Allow specifying debug path through the environment.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
parent
08cb029916
commit
9727fc5967
1 changed files with 5 additions and 1 deletions
|
|
@ -28,8 +28,12 @@ logfd = None
|
|||
|
||||
def log(*args):
|
||||
global logfd
|
||||
try:
|
||||
path = os.environ['NEWFOL_DEBUG']
|
||||
except:
|
||||
return
|
||||
if logfd is None:
|
||||
logfd = open(os.path.expanduser('~/newfol_debug.log'), "w")
|
||||
logfd = open(path, "w")
|
||||
logfd.write(" ".join(*args))
|
||||
logfd.flush()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue