From b44a2916ba410366078fd2f8dc5ddb10b3c4e65a Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 09 Oct 2007 16:58:39 +0000 Subject: Rework sugar.logger and make activities just redirect their output to a log. --- (limited to 'bin') diff --git a/bin/sugar-activity b/bin/sugar-activity index a8525f3..61d0e5a 100755 --- a/bin/sugar-activity +++ b/bin/sugar-activity @@ -25,12 +25,13 @@ import pygtk pygtk.require('2.0') import gtk import dbus +import dbus.service import dbus.glib -from sugar import logger from sugar.activity import activityhandle from sugar.bundle.activitybundle import ActivityBundle from sugar import _sugarext +from sugar import logger activity_instances = [] @@ -80,6 +81,8 @@ parser.add_option('-s', '--single-process', dest='single_process', help='start all the instances in the same process') (options, args) = parser.parse_args() +logger.start() + if 'SUGAR_BUNDLE_PATH' not in os.environ: print 'SUGAR_BUNDLE_PATH is not defined in the environment.' sys.exit(1) @@ -93,8 +96,6 @@ sys.path.append(bundle_path) bundle = ActivityBundle(bundle_path) -logger.start(bundle.get_bundle_id()) - gettext.bindtextdomain(bundle.get_bundle_id(), bundle.get_locale_path()) gettext.textdomain(bundle.get_bundle_id()) -- cgit v0.9.1