Inception Logging Blueprint

Registered by Andrew Forrest

Adapt Inception to use logging facilities instead of merely printing to
stdout/stderr.

After review, decide whether to implement "minimum" logging or go straight
to oslo/openstack logging or somewhere in between.

    + logging needs configuration and oslo provides that
    - incorporating OpenStack practices pulls in a lot of code

Blueprint information

Status:
Complete
Approver:
Changbin Liu
Priority:
Medium
Drafter:
Andrew Forrest
Direction:
Approved
Assignee:
Changbin Liu
Definition:
New
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Changbin Liu
Completed by
Changbin Liu

Related branches

Sprints

Whiteboard

Only two files exist with "print" statements in them (see appendix) but should start
with module-specific debuggers.

Time/Date should be appropriate for OpenStack compatibility.

Tasks:
------
T1 Decide which print statements should remain as prints
T2 Decide appropriate log level for each print statement that is to be converted
   - in general print statements stating abstractly what is happening should
     go to INFO while those showing in detail should go to DEBUG
   - messages originating within exception handlers
     - should be WARN or higher
     - should be logged and displayed

APPENDIX

1. "print" grepped from source:

inception/orchestrator.py: print "Your inception cloud '%s' is ready!!!" % self.prefix
inception/orchestrator.py: print "Gateway IP is %s" % self._gateway_floating_ip.ip
inception/orchestrator.py: print "Chef server WebUI is http://%s:4040" % self._chefserver_ip
inception/orchestrator.py: print "OpenStack dashboard is https://%s" % self._controller_ip
inception/orchestrator.py: print traceback.format_exc()
inception/orchestrator.py: print "Creating %s" % gateway
inception/orchestrator.py: print "Creating %s" % chefserver
inception/orchestrator.py: print "Creating %s" % controller
inception/orchestrator.py: print "Creating %s" % worker
inception/orchestrator.py: print ('wait at most %s seconds for servers to be ready (ssh-able + '
inception/orchestrator.py: print ('servers are not all ready, error=%s, sleep %s seconds'
inception/orchestrator.py: print "Creating and associating %s" % floating_ip
inception/orchestrator.py: print thread_name, func_info, exc
inception/orchestrator.py: print "Let's clean up inception cloud '%s'..." % self.prefix
inception/orchestrator.py: print ("Disassociating and releasing %s" % floating_ip)
inception/orchestrator.py: print traceback.format_exc()
inception/orchestrator.py: print 'Deleting %s' % server
inception/orchestrator.py: print traceback.format_exc()
inception/orchestrator.py: print "Inception cloud '%s' has been cleaned up." % self.prefix
inception/orchestrator.py: print info
inception/orchestrator.py: print traceback.format_exc()
inception/orchestrator.py: print """
inception/utils/cmd.py: print 'executing command=', cmd
inception/utils/cmd.py: print 'executing command=', cmd

(?)

Work Items

Work items:
A. [forrest-r] review oslo/example openstack logging: INPROGRESS
B. [] choose python built-in logging, oslo or in-between: TODO
C. [forrest-r] implement choice: TODO

This blueprint contains Public information 
Everyone can see this information.