<div>thank you Liviu,I have figure it out. The Selinux prevent the rsyslog write to other directory except &nbsp;"/var/log/". You can disable Selinux or config your directory</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I config and &nbsp;make it work use : &nbsp;chcon --reference /var/log/ &nbsp;/export/opensips/log/</div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------&nbsp;原始邮件&nbsp;------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b>&nbsp;"Liviu Chircu";&lt;liviu@opensips.org&gt;;</div><div><b>发送时间:</b>&nbsp;2016年9月22日(星期四) 晚上8:54</div><div><b>收件人:</b>&nbsp;"devel"&lt;devel@lists.opensips.org&gt;; <wbr></div><div></div><div><b>主题:</b>&nbsp;Re: [OpenSIPS-Devel]回复: opensips log file dose not work</div></div><div><br></div>
  
    
  
  
    <p><tt>My bad. I just noticed you did the restart command.</tt></p>
    <p><tt>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" ?</tt><tt><span style="color: rgb(68, 68, 68); font-family: tahoma, arial,
          sans-serif;"></span></tt></p>
    <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 22.09.2016 15:50, Liviu Chircu
      wrote:<br>
    </div>
    <blockquote cite="mid:e4acd7ec-af1e-cffd-e1ab-e838dce16e83@opensips.org" type="cite">
      
      <p><tt>Maybe you forgot to reload/restart the rsyslog daemon?</tt><br>
      </p>
      <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      <div class="moz-cite-prefix">On 22.09.2016 15:15, 龙 wrote:<br>
      </div>
      <blockquote cite="mid:tencent_3BA88E2E78BF77323FD611C4@qq.com" type="cite">
        <div><font face="Arial">Hi&nbsp;<span style="white-space: pre-wrap;">Liviu:</span></font></div>
        <div><span style="white-space: pre-wrap;"><font face="Arial">     thanks for your suggestion。 </font></span></div>
        <div><font face="Arial"><span style="white-space: pre-wrap;">     I‘m sure the file and the directory has -rwxrwxrwx  </span>permissions&nbsp;and</font><span style="font-family: Arial; white-space: pre-wrap;"> I use root did it with opensips2.2.1 and centos6.6。</span></div>
        <div><span style="white-space: pre-wrap;"><font face="Arial">     I make /var/log/opensips.log  work as following:</font></span></div>
        <div><span style="white-space: pre-wrap;"><font face="Arial">             </font></span><span style="color: rgb(68, 68, 68); font-family: tahoma, arial,
            sans-serif;">touch /var/log/opensips.log</span></div>
        <div><span style="color: rgb(68, 68, 68); font-family: tahoma,
            arial, sans-serif;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;add &nbsp;“&nbsp;</span><span style="color: rgb(68, 68, 68); font-family: tahoma, arial,
            sans-serif;">local0.* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/var/log/opensips.log &nbsp;”
            into /etc/rsyslog.conf</span></div>
        <div><span style="color: rgb(68, 68, 68); font-family: tahoma,
            arial, sans-serif;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;service rsyslog restart</span></div>
        <div><span style="color: rgb(68, 68, 68); font-family: tahoma,
            arial, sans-serif;">&nbsp; &nbsp; &nbsp;But when I change
            &nbsp;"/var/log/opensips.log" to
            "/export/opensips/log/opensips.log"
            &nbsp;or"/usr/local/opensips.log" &nbsp;..eg &nbsp; it doesn't work.</span></div>
        <div><span style="color: rgb(68, 68, 68); font-family: tahoma,
            arial, sans-serif;">&nbsp; &nbsp; &nbsp;I'm&nbsp;</span><font color="#444444" face="tahoma, arial, sans-serif">confuse with it。</font></div>
        <div><span style="color: rgb(68, 68, 68); font-family: tahoma,
            arial, sans-serif;"></span><span style="white-space: pre-wrap;"><font face="Arial">     </font></span></div>
        <div><span style="white-space: pre-wrap;"><font face="Arial">liu jinlong </font></span></div>
        <div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div style="font-size: 12px;font-family: Arial
            Narrow;padding:2px 0 2px 0;">------------------&nbsp;原始邮件&nbsp;------------------</div>
          <div style="font-size: 12px;background:#efefef;padding:8px;">
            <div><b>发件人:</b>&nbsp;"Liviu Chircu";<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:liviu@opensips.org">&lt;liviu@opensips.org&gt;</a>;</div>
            <div><b>发送时间:</b>&nbsp;2016年9月22日(星期四) 下午3:42</div>
            <div><b>收件人:</b>&nbsp;"devel"<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:devel@lists.opensips.org">&lt;devel@lists.opensips.org&gt;</a>;
              <wbr></div>
            <div><b>主题:</b>&nbsp;Re: [OpenSIPS-Devel] opensips log file dose
              not work</div>
          </div>
          <div><br>
          </div>
          <p><tt>Hi!</tt></p>
          <p><tt>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.<br>
            </tt></p>
          <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
          <div class="moz-cite-prefix">On 22.09.2016 09:37, 龙 wrote:<br>
          </div>
          <blockquote cite="mid:tencent_0BA2FD233C46BDB956D1CBF1@qq.com" type="cite">
            <div>hi everone:</div>
            <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I want change opensips log file location
              ,and I make it work in /var/log/opensips.log</div>
            <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; but when change the directory to an
              /export/opensips/log/opensips.log &nbsp;it dose not work. I
              don't kown why.</div>
            <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; does it has samething else to do? I need
              your help.</div>
            <div><br>
            </div>
            <div>liujinlong</div>
            <div><br>
            </div>
            <br>
            <fieldset class="mimeAttachmentHeader"></fieldset>
            <br>
            <pre wrap="">_______________________________________________
Devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
          </blockquote>
          <br>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
Devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
    </blockquote>
    <br></div>