Thanks to all for you replies

Renaud,

I tried your solution. I tried with apache.

I was able to modify the apache properties like you suggested me (also 
mentionned in Infodoc 87992 "How to redirect service log output with SMF")

> svccfg -s apache2

> setprop start/exec = "/lib/svc/method/http-apache2 start > /var/log/testlog 
> 2>&1"

> listprop start/exec

> start/exec  astring  "/lib/svc/method/http-apache2 start > /var/log/testlog 
> 2>&1"

After that using svcadm I refresh and restarted the service.

The modification were recorder correctly

> pargs -e `pgrep -f /usr/apache2/bin/httpd`

> SMF_METHOD=/lib/svc/method/http-apache2 start > /var/log/testlog 2>&1

But logging goes still to /var/svc/log

I'm affraid that what David says is right :

"Messages logged by svc.startd will still go into the /var/svc/log file"

Tony is right, it's still possible to configure usual apache logging 
(access_log & error_log)

The only working way I found is 

> /usr/apache2/bin/apachectl start > /var/log/testlog 2>&1

:-)
 
 
This message posted from opensolaris.org

Reply via email to