Propose: support different levels of logging on wok

Bug: wok is setting logging handlers only, not cherrypy handlers.


Issues:
After my troubleshooting, just saw that we need to set cherrypy handlers:
--- a/src/wok/server.py
+++ b/src/wok/server.py
@@ -120,6 +120,7 @@ class Server(object):
                                                 delay=1)
         h.setLevel(logLevel)
         h.setFormatter(cherrypy._cplogging.logfmt)
+        cherrypy.log.access_log.setLevel(logLevel)
 
         # Add access log file to cherrypy configuration
         cherrypy.log.access_log.addHandler(h)
@@ -128,6 +129,7 @@ class Server(object):
         h = SafeWatchedFileHandler(options.error_log, 'a', delay=1)
         h.setLevel(logLevel)
         h.setFormatter(cherrypy._cplogging.logfmt)
+        cherrypy.log.error_log.setLevel(logLevel)
 
         # Add error log file to cherrypy configuration
         cherrypy.log.error_log.addHandler(h)



When testing, got this output:

Running with loglevel == debug
command-line ./src/wokd: No output

access_log: lot of output, info output and commands results

error_log: debug info

------------------------

Running with loglevel == info
command-line ./src/wokd: No output

access_log: lot of output, info output

error_log:  info

--------------------------------

Running with loglevel == error
command-line ./src/wokd: Info output (no expected)

access_log: just calls to the urls

error_log: only error


The last one was not expected :(

-- 

Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn@br.ibm.com