When running from a terminal don't use logs.
This commit is contained in:
parent
56ecabbd78
commit
2a47190f28
@ -44,7 +44,7 @@ def start(log_filename=None):
|
||||
if os.environ.has_key('SUGAR_LOGGER_LEVEL'):
|
||||
set_level(os.environ['SUGAR_LOGGER_LEVEL'])
|
||||
|
||||
if log_filename:
|
||||
if log_filename and not sys.stdin.isatty():
|
||||
log_path = os.path.join(get_logs_dir(), log_filename + '.log')
|
||||
log_file = open(log_path, 'w')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user