<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.pre
{mso-style-name:pre;}
.MsoChpDefault
{mso-style-type:export-only;}
/* Page Definitions */
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>Dear all,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>The first version of logging module (python
version) has been committed to branches/trac176, <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>and xfrout module has been updated as the
first module to use logging framework (also the code<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>is ready for review). <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Currently, python logging module supports
four channels ( null, file, syslog and stderr) and five<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>levels (debug, info, warning, error and
critical), more levels will be added later.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>The logging severity can be reconfigured at
the run-time through bindctl, for the detail, you can <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>try it with xfrout.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Following are the description of the four
channels:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Null channel is the default channel. A
daemon can’t use syslog and stderr channel at the same<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>time. SysLog channel is intended for
use when the daemon is running as a background process, <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>and stderr channel works for foreground
process. File channel is an optional, which output log <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>messages to a disk file.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>1.Null channel:<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>All messages
send to the channel will be discarded.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>2.File channel:<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>It can include
limitation on the file location, how large the file is allowed to become , and
how <o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>many versions of
the file will be saved each time the file is opened.<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>File channel has
three config options, all of them can be reconfigured at the run-time.<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>-log_file : The
location of log file. File channel will be closed if the log_file is not
specified.<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>-max_bytes : The
option is used to limit log growth. The default behavior is not to limit the <o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>size of the
file.<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>-backupcount : Logger
retain that many backup versions of the file by renaming them when <o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>opening. No
backup versions are kept by default.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>3. SysLog channel:<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>It send log
messages to the syslog. If <em><span style='font-family:"Calibri","sans-serif"'>facility</span></em>
is not specified, <span class=pre>LOG_USER</span> is used. <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>4. Stderr channel:<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>All log messages
send to the server's standard error stream.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Any other suggestions? Such as different
debug log level… <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I will write a logging requirement document
based on this email and publish it on trac.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Thank you.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Jerry<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
</div>
</body>
</html>