thank you Liviu,I have figure it out. The Selinux prevent the rsyslog write to 
other directory except  "/var/log/". You can disable Selinux or config your 
directory
          I config and  make it work use :  chcon --reference /var/log/  
/export/opensips/log/




------------------ ???????? ------------------
??????: "Liviu Chircu";<li...@opensips.org>;
????????: 2016??9??22??(??????) ????8:54
??????: "devel"<devel@lists.opensips.org>; 

????: Re: [OpenSIPS-Devel]?????? opensips log file dose not work



                   
My bad. I just noticed you did the restart command.
     
The (currently) most reasonable explanation is that rsyslog         cannot 
create the file, since it runs as "syslog" IIRC. Can you         manually 
ensure "/export/opensips/log/opensips.log" exists, and         have the same 
permissions as "/var/log/opensips.log" ?
     Liviu Chircu OpenSIPS Developer http://www.opensips-solutions.com     On 
22.09.2016 15:50, Liviu Chircu       wrote:
     
                   
Maybe you forgot to reload/restart the rsyslog daemon?
       
       Liviu Chircu OpenSIPS Developer http://www.opensips-solutions.com       
On 22.09.2016 15:15, ?? wrote:
       
                Hi Liviu??
              thanks for your suggestion?? 
              I??m sure the file and the directory has -rwxrwxrwx  permissions 
and I use root did it with opensips2.2.1 and centos6.6??
              I make /var/log/opensips.log  work as following??
                      touch /var/log/opensips.log
                      add  ?? local0.*            /var/log/opensips.log  ??     
        into /etc/rsyslog.conf
                      service rsyslog restart
              But when I change              "/var/log/opensips.log" to         
    "/export/opensips/log/opensips.log"              
or"/usr/local/opensips.log"  ..eg   it doesn't work.
              I'm confuse with it??
              
         liu jinlong 
                    
           
           
           
           ------------------ ???????? ------------------
                        ??????: "Liviu Chircu";<li...@opensips.org>;
             ????????: 2016??9??22??(??????) ????3:42
             ??????: "devel"<devel@lists.opensips.org>;               
             ????: Re: [OpenSIPS-Devel] opensips log file dose               
not work
           
           
           
           
Hi!
           
If you made "/var/log/opensips.log" work, then please               ensure 
write permissions on "/export/opensips/log/" for               the user you're 
running OpenSIPS with, so it can create               the file.
             
           Liviu Chircu OpenSIPS Developer http://www.opensips-solutions.com    
       On 22.09.2016 09:37, ?? wrote:
           
                        hi everone:
                           I want change opensips log file location             
  ,and I make it work in /var/log/opensips.log
                           but when change the directory to an               
/export/opensips/log/opensips.log  it dose not work. I               don't kown 
why.
                           does it has samething else to do? I need             
  your help.
             
             
             liujinlong
             
             
             
                          
             _______________________________________________ Devel mailing list 
Devel@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel                       
         
         
                  
         _______________________________________________ Devel mailing list 
Devel@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel               
       
              
       _______________________________________________ Devel mailing list 
Devel@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to