launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05207
[Merge] lp:~stevenk/launchpad/kill-set_up_tacfile_logging into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/kill-set_up_tacfile_logging into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/kill-set_up_tacfile_logging/+merge/78908
I've removed set_up_tacfile_logging.
I'm not certain if it was ever useful, and the codehosting sftp service (which poppy was modeled on) does not make use of it, so I've removed it.
--
https://code.launchpad.net/~stevenk/launchpad/kill-set_up_tacfile_logging/+merge/78908
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/kill-set_up_tacfile_logging into lp:launchpad.
=== modified file 'daemons/poppy-sftp.tac'
--- daemons/poppy-sftp.tac 2011-05-10 13:56:21 +0000
+++ daemons/poppy-sftp.tac 2011-10-11 03:21:24 +0000
@@ -70,11 +70,6 @@
return SFTPServer(avatar, get_poppy_root())
-# Connect Python logging to Twisted's logging.
-from lp.services.twistedsupport.loggingsupport import set_up_tacfile_logging
-set_up_tacfile_logging("poppy-sftp", logging.INFO)
-
-
components.registerAdapter(
poppy_sftp_adapter, LaunchpadAvatar, filetransfer.ISFTPServer)
=== modified file 'lib/lp/services/twistedsupport/loggingsupport.py'
--- lib/lp/services/twistedsupport/loggingsupport.py 2011-08-16 20:35:11 +0000
+++ lib/lp/services/twistedsupport/loggingsupport.py 2011-10-11 03:21:24 +0000
@@ -12,7 +12,6 @@
'log_oops_from_failure',
'set_up_logging_for_script',
'set_up_oops_reporting',
- 'set_up_tacfile_logging',
]
@@ -75,25 +74,6 @@
return logger_object
-def set_up_tacfile_logging(name, level):
- """Create a `Logger` object for use in tac files.
-
- This is preferable to use over `set_up_logging_for_script` for .tac
- files since there's no options to pass through. The logger object
- is connected to Twisted's log and returned.
-
- :param name: The logger instance name.
- :param level: The log level to use, eg. logging.INFO or logging.DEBUG
- """
- logger = logging.getLogger(name)
- channel = logging.StreamHandler(log.StdioOnnaStick())
- channel.setLevel(level)
- channel.setFormatter(logging.Formatter('%(message)s'))
- logger.addHandler(channel)
- logger.setLevel(level)
- return logger
-
-
def set_up_oops_reporting(configuration, name, mangle_stdout=True):
"""Set up OOPS reporting by starting the Twisted logger with an observer.
Follow ups