Elena, your advice is very useful for me. Thank you very much. :-)
However,i think i should introduce the environment I now used.
 
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---->/var/log/messages
 
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:
 
1. In kamailio.cfg set  "log_facility=LOG_LOCAL5"
 
2. In syslog.conf set 
        # Log anything (except mail) of level info or higher.
        # Don't log private authentication messages!
        *.info;mail.none;authpriv.none;cron.none;local5.none  /var/log/messages
 
3. In syslog.conf set
        # log messages with LOG_LOCAL5 in /var/log/kamailio.log
        local5.*      -/home/albert/mylocal/myvar/log/kamailio.log
Any idea will be appreciated.  Thanks in advance.
 
------------------
albert.gu
 
 
------------------ 原始邮件 ------------------
发送时间: 2011年12月21日(星期三) 凌晨4:29
收件人: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List"<sr-users@lists.sip-router.org>;
抄送: "sunny_day"<416415455@qq.com>;
主题: Re: [SR-Users] 回复: Why? there isn't a syslog.conf under mykamailiodirectory?
 
Hi,

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:

http://www.kamailio.org/wiki/tutorials/3.2.x/syslog

Regards,
Ramona


 On 12/20/11 10:35 AM, sunny_day wrote:
I got it . Thank you Michal :)
 
------------------
albert.gu
 
 
------------------ 原始邮 件 ------------------
发送时间: 2011年12月20日(星期二) 下午5:20
收件人: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List"<sr-users@lists.sip-router.org>;
主题: Re: [SR-Users] Why? there isn't a syslog.conf under mykamailiodirectory?
 
Hi,

use -E option and you'll get all the logs on the sterr.

Michal

sunny_day píše v Út 20. 12. 2011 v 17:10 +0800:
> Olle , Thank you very much for your reply!
> I am not the root user on the unix system. but I want to customize the
> log file for the function:  xlog.
> Now, I don't know where to see the content what xlog writes. It can
> help me to debug the script of kamailio.cfg i edited.

> what i do is collect the CDRs by dialog and acc modules. Any
> suggestion will be appreciated.

> Thanks a lot !

> ------------------
> albert.gu


> ------------------ Original ------------------
> From:  "Olle E. Johansson"<oej@edvina.net>;
> Date:  Tue, Dec 20, 2011 04:57 PM
> To:  "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> UsersMailing List"<sr-users@lists.sip-router.org>;
>
> Subject:  Re: [SR-Users] Why? there isn't a syslog.conf under my
> kamailiodirectory?

>
> 20 dec 2011 kl. 05:57 skrev sunny_day:
>
> > There should be a syslog.conf file under the kamailio directory.
> > But I haven't.
> > 
> > I only want to see the contents generated by "xlog"
>
> Syslog is a daemon in your operating system. The configuration file is
> propably in the /etc
> directory. Try running "man syslog.conf" for more information about
> that file.
>
> /O
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
> list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users