Put the log in the profile. Release 0.33

This commit is contained in:
Marco Pesenti Gritti 2006-10-06 18:53:12 +02:00
parent 031aa6c7d6
commit 7801e05293
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
AC_INIT([Sugar],[0.32],[],[sugar])
AC_INIT([Sugar],[0.33],[],[sugar])
AC_PREREQ([2.59])

View File

@ -12,6 +12,8 @@ if dbus.version < (0, 70, 0):
import gobject
from sugar import env
__queue = None
CONSOLE_BUS_NAME = 'org.laptop.Sugar.Console'
@ -121,7 +123,9 @@ def start(console_id, console = None):
root_logger = logging.getLogger('')
root_logger.setLevel(logging.DEBUG)
root_logger.addHandler(Handler(queue))
fileh = logging.FileHandler('/tmp/sugar.log')
log_file = os.path.join(env.get_profile_path(), 'sugar.log')
fileh = logging.FileHandler(log_file)
fileh.setFormatter(logging.Formatter("""[%(asctime)s] %(message)s"""))
root_logger.addHandler(fileh)