[Bugs] #162 MINO: Use shell.log in sugar emulator as well

SugarLabs Bugs bugtracker-noreply at sugarlabs.org
Sun Dec 28 03:42:08 EST 2008


#162: Use shell.log in sugar emulator as well
--------------------+-------------------------------------------------------
 Reporter:  erikos  |       Owner:  marcopg          
     Type:  defect  |      Status:  new              
 Priority:  minor   |   Milestone:                   
Component:  sugar   |     Version:  Git as of bugdate
 Keywords:  r?      |  
--------------------+-------------------------------------------------------
 I think it make sense to always use the same logging mechanism and print
 the logs to the file. If you like to keep the output in the shell as well
 - we could as well add printing to both in the emulator case.

 {{{
 diff --git a/src/sugar/logger.py b/src/sugar/logger.py
 index 26a7fe3..e62edc6 100644
 --- a/src/sugar/logger.py
 +++ b/src/sugar/logger.py
 @@ -91,7 +91,7 @@ def start(log_filename=None):
      if os.environ.has_key('SUGAR_LOGGER_LEVEL'):
          set_level(os.environ['SUGAR_LOGGER_LEVEL'])

 -    if log_filename and not sys.stdin.isatty():
 +    if log_filename:
          try:
              log_path = os.path.join(get_logs_dir(), log_filename +
 '.log')
 }}}

-- 
Ticket URL: <http://dev.sugarlabs.org/ticket/162>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list