[telepathy-ashes/master] Honour ECHO_LOGFILE environment var.
David Laban
david.laban at collabora.co.uk
Sat Oct 24 08:24:24 PDT 2009
---
ashes/tools/echo_bot.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/ashes/tools/echo_bot.py b/ashes/tools/echo_bot.py
index 83810d7..8a33d8f 100644
--- a/ashes/tools/echo_bot.py
+++ b/ashes/tools/echo_bot.py
@@ -154,6 +154,11 @@ def main(connection_regexp='.*echo123.*',
the echo service on it. Otherwise looks on the bus for connections matching
connection_regexp.
"""
+ log_filename = os.environ.get('ECHO_LOGFILE', '')
+ if log_filename != '':
+ log_file = open(log_filename, 'w')
+ sys.stdout = logfile
+ sys.stderr = logfile
runner = EchoBotRunner(contact_regexp=contact_regexp)
if account_file:
runner.echo_from_file(account_file)
--
1.5.6.5
More information about the telepathy-commits
mailing list