diff --git a/sugar/logger.py b/sugar/logger.py index 43d0d768..26b03ac5 100644 --- a/sugar/logger.py +++ b/sugar/logger.py @@ -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')