In Windows Vista or later, you must have administrator rights to write anything in the directory C:\Program Files\.
But Apache does not have administrative rights for security reasons.
This is the reason for this error.
Edited
Sorry, the answer I will explain explains about Apache not tomcat.
Need log configuration changes to the tomcat configuration files, for example \conf\logging.properties, server.xml.
In logging.properties you can find some values ${catalina.base}/logs. Change this to the absolute path you like (ex c:/path/you/like/logs).
In server.xml, change the directory attribute in the Valve tag as shown below
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="c:/path/you/like/logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
tomcat .
conf.
.
,
, Program Files, .
.
.
.
, Run as administrator .
.
, , , .
-, .
-, ( ) (, ).
, , , .
.
- Apache.
, .
, () httpd.conf
ErrorLog "logs/error.log"
#CustomLog "logs/access.log" common
CustomLog "logs/access.log" combined
common .
ErrorLog "c:/path/you/like/logs/error.log"
CustomLog "c:/path/you/like/logs/access.log" common
CustomLog "c:/path/you/like/logs/access.log" combined
Apache.