<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
Hi Ramon,<br>
<br>
<div class="moz-cite-prefix">On 01/19/2017 04:28 PM, Ramon Medeiros
wrote:<br>
</div>
<blockquote
cite="mid:c13f54e2-ea77-5706-ec8c-30ba723d3147@linux.vnet.ibm.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<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>
</blockquote>
<br>
I am not sure what was not expected. Could you clarify?<br>
<br>
<blockquote
cite="mid:c13f54e2-ea77-5706-ec8c-30ba723d3147@linux.vnet.ibm.com"
type="cite">
<pre class="moz-signature" cols="72">--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:ramonn@br.ibm.com">ramonn@br.ibm.com</a> </pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kimchi-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>