Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cinder editing

Hello, I've installed openstack (havana) and cinder according to docs. Now I want to put my own log statements and tried following:

1) tried existing code to print my own logs  
msg = _("cinder test log")
LOG.info(msg)

2) tried to use exception
msg = _("cinder test exception")
raise exc.HTTPNotFound(explanation=msg)

3) tried logging module
msg = _("cinder logging")
logging.basicConfig(filename="/tmp/log1",level=logging.DEBUG)  
logging.info(msg)

Editing following file "/usr/lib/python2.7/dist-packages/cinder/api/v2/volumes.py" and to see result of changes restarting cinder-api and checking in log files, but none of them is working.

how to make changes to exisiting cinder editingcode and debug

Hello, I've installed openstack (havana) and cinder according to docs. Now I want to put my own log statements and tried following:

1) tried existing code to print my own logs  
msg = _("cinder test log")
LOG.info(msg)

2) tried to use exception
msg = _("cinder test exception")
raise exc.HTTPNotFound(explanation=msg)

3) tried logging module
msg = _("cinder logging")
logging.basicConfig(filename="/tmp/log1",level=logging.DEBUG)  
logging.info(msg)

Editing following file "/usr/lib/python2.7/dist-packages/cinder/api/v2/volumes.py" and to see result of changes restarting cinder-api and checking in log files, but none of them is working.