# How can customize the access, error and stats logs to log in Apache access log format

**URL:** https://community.wowza.com/t/how-can-customize-the-access-error-and-stats-logs-to-log-in-apache-access-log-format/35103
**Category:** Wowza Streaming Engine
**Created:** [September 24, 2012, 1:34pm UTC](https://community.wowza.com/t/how-can-customize-the-access-error-and-stats-logs-to-log-in-apache-access-log-format/35103 "2012-09-24T13:34:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![A\_R](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@A\_R](https://community.wowza.com/u/A_R)
#### Post date: [September 24, 2012, 1:34pm UTC](https://community.wowza.com/t/how-can-customize-the-access-error-and-stats-logs-to-log-in-apache-access-log-format/35103/1 "2012-09-24T13:34:45Z")

</div>

How can customize the access, error and stats logs to log in Apache access log format?

We would like to log the access and stats log in Apache access log format. Is it possible?

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [September 24, 2012, 10:00pm UTC](https://community.wowza.com/t/how-can-customize-the-access-error-and-stats-logs-to-log-in-apache-access-log-format/35103/2 "2012-09-24T22:00:06Z")

</div>

You can re-arrange log fields by changing the layout.Fields line in an Appender in the /conf/log4j.properties file. For example this line in the Access Appender

```auto
log4j.appender.serverAccess.layout.Fields=x-severity,x-category,x-event;date,time,c-client-id,c-ip,c-port,cs-bytes,sc-bytes,x-duration,x-sname,x-stream-id,x-spos,sc-stream-bytes,cs-stream-bytes,x-file-size,x-file-length,x-ctx,x-comment

```

Note the commented out Field list at the top of this file that shows all the built-in log fields, which are not all included by default.

To add fields, take a look the ILogNotify api in the ServerSide API, there is an example.

[https://www.wowza.com/resources/WowzaMediaServer\_ServerSideAPI.pdf](https://www.wowza.com/resources/WowzaMediaServer_ServerSideAPI.pdf)

Richard

---

<div class="post-metadata">

### Author: ![Louis\_KWON1](https://avatars.discourse-cdn.com/v4/letter/l/d9b06d/32.png) [@Louis\_KWON1](https://community.wowza.com/u/Louis_KWON1)
#### Post date: [July 26, 2018, 7:28pm UTC](https://community.wowza.com/t/how-can-customize-the-access-error-and-stats-logs-to-log-in-apache-access-log-format/35103/3 "2018-07-26T19:28:02Z")

</div>

is not uncomfortable
