Use Realm.string_id instead of Realm.domain when logging.

This commit is contained in:
Rishi Gupta
2017-03-13 09:42:14 -07:00
parent 00f49d4121
commit 5dc683ba8d
2 changed files with 3 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ def log_and_report(email_message, error_message, debug_info):
scrubbed_error)
if "stream" in debug_info:
scrubbed_error = u"Realm: %s\n%s" % (debug_info["stream"].realm.domain,
scrubbed_error = u"Realm: %s\n%s" % (debug_info["stream"].realm.string_id,
scrubbed_error)
logger.error(scrubbed_error)
@@ -313,7 +313,7 @@ def process_stream_message(to, subject, message, debug_info):
debug_info["stream"] = stream
send_zulip(settings.EMAIL_GATEWAY_BOT, stream, subject, body)
logging.info("Successfully processed email to %s (%s)" % (
stream.name, stream.realm.domain))
stream.name, stream.realm.string_id))
def process_missed_message(to, message, pre_checked):
# type: (Text, message.Message, bool) -> None

View File

@@ -1067,7 +1067,7 @@ def do_export_realm(realm, output_dir, threads, exportable_user_ids=None):
# Start parallel jobs to export the UserMessage objects.
launch_user_message_subprocesses(threads=threads, output_dir=output_dir)
logging.info("Finished exporting %s" % (realm.domain))
logging.info("Finished exporting %s" % (realm.string_id))
create_soft_link(source=output_dir, in_progress=False)
def export_attachment_table(realm, output_dir, message_ids):