← Back to team overview

openstack team mailing list archive

Swift and logging requests

 

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