[Openstack] Swift and logging requests

andi abes andi.abes at gmail.com
Thu Apr 28 23:07:43 UTC 2011


I was trying to better understand Swift, and to that end I thought it would
be interesting to log the requests coming in and out of the different
servers. Alas, I'm new to Paste (and very rusty on the little python I knew)
- hence I've having problems achieving this.

I found the following:

Logging configuration in python: http://www.red-dove.com/python_logging.html

Logging WSGI requests:
http://wiki.pylonshq.com/display/pylonscookbook/Request+logging


And based on these I've ended up in proxy-server.conf that looks something
like below. But it doesn't seem to achieve the desired results. Pointers
highly appreciated !





[pipeline:main]
pipeline =  mylogging healthcheck cache swauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true

[filter:mylogging]
use = egg:Paste#translogger
setup_console_handler = False
logger_name = wsgi

[loggers]
keys = root

[handlers]
keys = console

[logger_root]
level = DEBUG
handlers = console

# Handler for printing messages to the console
[handler_console]
class = FileHandler
args = ('/home/openstack/swift.log','a')
level = DEBUG
formatter = generic

[formatter_generic]
format = %(asctime)s %(name)s[%(levelname)s] %(message)s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20110428/6fc583ea/attachment.html>


More information about the Openstack mailing list