Ask Your Question
0

gnocchi-api running as WSGI application

asked 2019-01-27 19:57:54 -0500

Sudheendra Harwalkar gravatar image

updated 2019-01-27 23:08:44 -0500

I have following modified gnocchi-api to display detailed logs for debugging and analysis, it was working in Octata with custom gnocchi/rest/app.wsgi, now its deprecated as per https://gnocchi.xyz/releasenotes/4.0.html (https://gnocchi.xyz/releasenotes/4.0....), I am trying with following code in devstack master, but its not displaying the logs in __call__ now, am I missing something here?

#

from oslo_log import log as logging from gnocchi.cli import api LOG = logging.getLogger(__name__)

class GnocchiWsgiMiddleware(object): def __init__(self, app): self.app = app

def __call__(self,environ,start_response):
    LOG.info("*******************")
    return self.app(environ,start_response)

app = api.wsgi() application = GnocchiWsgiMiddleware(app)

##############################

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-01-28 18:36:58 -0500

Sudheendra Harwalkar gravatar image

Now it's working issue was with LOG

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2019-01-27 19:57:54 -0500

Seen: 19 times

Last updated: Jan 28