<DIV>Elena, your advice is very useful for me. Thank you very much. :-)</DIV>
<DIV>However,i think i should introduce the environment I now used.</DIV>
<DIV>&nbsp;</DIV>
<DIV>First, there are 3 users on the linux, and one kamailio.cfg for each user. I am not the root user. So i don't have the priviledge to write the diretory----&gt;/var/log/messages</DIV>
<DIV>&nbsp;</DIV>
<DIV>According the introduction you provided for me, I want to setup my own log file. But I am not sure whether it will work. The idea is:</DIV>
<DIV>&nbsp;</DIV>
<DIV>1. In kamailio.cfg set&nbsp; "log_facility=LOG_LOCAL5" </DIV>
<DIV>&nbsp;</DIV>
<DIV>2. In syslog.conf set&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; # Log anything (except mail) of level info or higher.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Don't log private authentication messages!<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; *.info;mail.none;authpriv.none;cron.none;local5.none&nbsp; /var/log/messages</DIV>
<DIV>&nbsp;</DIV>
<DIV>3. In syslog.conf set</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; # log messages with LOG_LOCAL5 in /var/log/kamailio.log<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local5.*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -/home/albert/mylocal/myvar/log/kamailio.log<BR></DIV>
<DIV>Any idea will be appreciated.&nbsp; Thanks in advance.</DIV>
<DIV>&nbsp;</DIV>
<DIV><SIGN signid="1">
<DIV style="FONT-FAMILY: Arial Narrow; COLOR: #909090; FONT-SIZE: 12px">------------------</DIV>
<DIV style="FONT-FAMILY: Verdana; COLOR: #000; FONT-SIZE: 14px"></DIV>
<DIV></DIV>albert.gu</SIGN> </DIV>
<DIV><TINCLUDETAIL>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV style="COLOR: #000">
<DIV style="PADDING-BOTTOM: 2px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: Arial Narrow; FONT-SIZE: 12px; PADDING-TOP: 2px">------------------ 原始邮件 ------------------</DIV>
<DIV style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; BACKGROUND: #efefef; FONT-SIZE: 12px; PADDING-TOP: 8px">
<DIV id=menu_sender><B>发件人:</B>&nbsp;"Elena-Ramona Modroiu"&lt;ramona@asipto.com&gt;;</DIV>
<DIV><B>发送时间:</B>&nbsp;2011年12月21日(星期三) 凌晨4:29</DIV>
<DIV><B>收件人:</B>&nbsp;"SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List"&lt;sr-users@lists.sip-router.org&gt;; <WBR></DIV>
<DIV><B>抄送:</B>&nbsp;"sunny_day"&lt;416415455@qq.com&gt;; <WBR></DIV>
<DIV><B>主题:</B>&nbsp;Re: [SR-Users] 回复: Why? there isn't a syslog.conf under mykamailiodirectory?</DIV></DIV>
<DIV>&nbsp;</DIV>Hi,<BR><BR>regarding the configuration of syslog to write kamailio log messges in a special file, you can find couple of tutorials on kamailio.org wiki sites. One is:<BR><BR><A class=moz-txt-link-freetext href="http://www.kamailio.org/wiki/tutorials/3.2.x/syslog">http://www.kamailio.org/wiki/tutorials/3.2.x/syslog</A> <BR><BR>Regards,<BR>Ramona<BR><BR><BR>&nbsp;On 12/20/11 10:35 AM, sunny_day wrote: 
<BLOCKQUOTE cite=mid:tencent_00C4C179240996462CA4895D@qq.com type="cite">
<DIV>I got it . Thank you Michal :)</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV style="FONT-FAMILY: Arial Narrow; COLOR: #909090; FONT-SIZE: 12px">------------------</DIV>
<DIV style="FONT-FAMILY: Verdana; COLOR: #000; FONT-SIZE: 14px">
<DIV>albert.gu</DIV></DIV></DIV>
<DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV style="COLOR: #000">
<DIV style="PADDING-BOTTOM: 2px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: Arial Narrow; FONT-SIZE: 12px; PADDING-TOP: 2px">------------------ 原始邮 件 ------------------</DIV>
<DIV style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; BACKGROUND: #efefef; FONT-SIZE: 12px; PADDING-TOP: 8px">
<DIV id=menu_sender><B>发件人:</B>&nbsp;"Michal Matyska"<A class=moz-txt-link-rfc2396E href="mailto:michal.matyska@iptel.org">&lt;michal.matyska@iptel.org&gt;</A>;</DIV>
<DIV><B>发送时间:</B>&nbsp;2011年12月20日(星期二) 下午5:20</DIV>
<DIV><B>收件人:</B>&nbsp;"SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List"<A class=moz-txt-link-rfc2396E href="mailto:sr-users@lists.sip-router.org">&lt;sr-users@lists.sip-router.org&gt;</A>; <WBR></DIV>
<DIV><B>主题:</B>&nbsp;Re: [SR-Users] Why? there isn't a syslog.conf under mykamailiodirectory?</DIV></DIV>
<DIV>&nbsp;</DIV>Hi,<BR><BR>use -E option and you'll get all the logs on the sterr.<BR><BR>Michal<BR><BR>sunny_day píše v &Uacute;t 20. 12. 2011 v 17:10 +0800:<BR>&gt; Olle , Thank you very much for your reply!<BR>&gt; I am not the root user on the unix system. but I want to customize the<BR>&gt; log file for the function:&nbsp; xlog.<BR>&gt; Now, I don't know where to see the content what xlog writes. It can<BR>&gt; help me to debug the script of kamailio.cfg i edited.<BR>&gt;&nbsp; <BR>&gt; what i do is collect the CDRs by dialog and acc modules. Any<BR>&gt; suggestion will be appreciated.<BR>&gt;&nbsp; <BR>&gt; Thanks a lot !<BR>&gt;&nbsp; <BR>&gt; ------------------<BR>&gt; albert.gu<BR>&gt;&nbsp; <BR>&gt;&nbsp; <BR>&gt; ------------------ Original ------------------<BR>&gt; From:&nbsp; "Olle E. Johansson"<A class=moz-txt-link-rfc2396E href="mailto:oej@edvina.net">&lt;oej@edvina.net&gt;</A>;<BR>&gt; Date:&nbsp; Tue, Dec 20, 2011 04:57 PM<BR>&gt; To:&nbsp; "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -<BR>&gt; UsersMailing List"<A class=moz-txt-link-rfc2396E href="mailto:sr-users@lists.sip-router.org">&lt;sr-users@lists.sip-router.org&gt;</A>; <BR>&gt; <BR>&gt; Subject:&nbsp; Re: [SR-Users] Why? there isn't a syslog.conf under my<BR>&gt; kamailiodirectory?<BR>&gt;&nbsp; <BR>&gt; <BR>&gt; 20 dec 2011 kl. 05:57 skrev sunny_day:<BR>&gt; <BR>&gt; &gt; There should be a syslog.conf file under the kamailio directory.<BR>&gt; &gt; But I haven't.<BR>&gt; &gt;&nbsp; <BR>&gt; &gt; I only want to see the contents generated by "xlog"<BR>&gt; <BR>&gt; Syslog is a daemon in your operating system. The configuration file is<BR>&gt; propably in the /etc <BR>&gt; directory. Try running "man syslog.conf" for more information about<BR>&gt; that file.<BR>&gt; <BR>&gt; /O<BR>&gt; <BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<BR>&gt; list<BR>&gt; <A class=moz-txt-link-abbreviated href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</A> <BR>&gt; <A class=moz-txt-link-freetext href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</A> <BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<BR>&gt; <A class=moz-txt-link-abbreviated href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</A> <BR>&gt; <A class=moz-txt-link-freetext href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</A> <BR><BR><BR><BR>_______________________________________________<BR>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<BR><A class=moz-txt-link-abbreviated href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</A> <BR><A class=moz-txt-link-freetext href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</A> <BR></DIV></DIV><BR>
<FIELDSET class=mimeAttachmentHeader></FIELDSET> <BR><PRE wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</A>
<A class=moz-txt-link-freetext href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</A>
</PRE></BLOCKQUOTE><BR></DIV></TINCLUDETAIL></DIV>