<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Propose: support different levels of logging on wok <br>
    </p>
    <p>Bug: wok is setting logging handlers only, not cherrypy handlers.</p>
    <p><br>
      Issues:<br>
      After my troubleshooting, just saw that we need to set cherrypy
      handlers:<br>
      --- a/src/wok/server.py<br>
      +++ b/src/wok/server.py<br>
      @@ -120,6 +120,7 @@ class Server(object):<br>
                                                       delay=1)<br>
               h.setLevel(logLevel)<br>
               h.setFormatter(cherrypy._cplogging.logfmt)<br>
      +        cherrypy.log.access_log.setLevel(logLevel)<br>
       <br>
               # Add access log file to cherrypy configuration<br>
               cherrypy.log.access_log.addHandler(h)<br>
      @@ -128,6 +129,7 @@ class Server(object):<br>
               h = SafeWatchedFileHandler(options.error_log, 'a',
      delay=1)<br>
               h.setLevel(logLevel)<br>
               h.setFormatter(cherrypy._cplogging.logfmt)<br>
      +        cherrypy.log.error_log.setLevel(logLevel)<br>
       <br>
               # Add error log file to cherrypy configuration<br>
               cherrypy.log.error_log.addHandler(h)<br>
    </p>
    <p><br>
      <br>
      When testing, got this output:<br>
    </p>
    <p>Running with loglevel == debug<br>
      command-line ./src/wokd: No output</p>
    <p>access_log: lot of output, info output and commands results</p>
    <p>error_log: debug info<br>
      <br>
      ------------------------<br>
    </p>
    <p>Running with loglevel == info<br>
      command-line ./src/wokd: No output</p>
    <p>access_log: lot of output, info output<br>
    </p>
    <p>error_log:  info<br>
    </p>
    <p>--------------------------------</p>
    <p>Running with loglevel == error<br>
      command-line ./src/wokd: Info output (no expected)<br>
    </p>
    <p>access_log: just calls to the urls<br>
    </p>
    <p>error_log: only error<br>
    </p>
    <p><br>
      The last one was not expected :(<br>
      <br>
    </p>
    <pre class="moz-signature" cols="72">-- 

Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems &amp; Technology Group
Phone : +55 19 2132 7878
<a class="moz-txt-link-abbreviated" href="mailto:ramonn@br.ibm.com">ramonn@br.ibm.com</a> </pre>
  </body>
</html>