# Missing values in log fields in stats log

**URL:** https://community.wowza.com/t/missing-values-in-log-fields-in-stats-log/35699
**Category:** Wowza Developer Dojo
**Tags:** wowza-streaming-server-java-api
**Created:** [October 7, 2014, 2:04pm UTC](https://community.wowza.com/t/missing-values-in-log-fields-in-stats-log/35699 "2014-10-07T14:04:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Shoo\_Kyuk\_Wei](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@Shoo\_Kyuk\_Wei](https://community.wowza.com/u/Shoo_Kyuk_Wei)
#### Post date: [October 7, 2014, 2:04pm UTC](https://community.wowza.com/t/missing-values-in-log-fields-in-stats-log/35699/1 "2014-10-07T14:04:16Z")

</div>

Hi guys,

I notice that some of the fields(x-severity, x-category, x-event) is missing from the stats log(wowzamediaserver\_stats.log).

```auto
x-app 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
420317720 INFO rtsp connect 9/17/2014 9:49:48 853364606 192.168.12.108 - 0 0 26.38 - - - - - - - 853364606 -
420317720 INFO stream create 9/17/2014 9:49:48 853364606 192.168.12.108 - 0 0 0.025 420317720/small.mp4 1 0 0 0 - - - -
420317720 INFO rtsp describe 9/17/2014 9:49:48 853364606 192.168.12.108 - 0 0 0.205 420317720/small.mp4 - 0 - - 26469936 596.544 853364606 -
420317720 INFO stream play 9/17/2014 9:49:48 853364606 192.168.12.108 - 0 0 0.134 420317720/small.mp4 1 0 0 0 26469936 596.544 420317720/small.mp4 -
420317720 INFO rtsp play 9/17/2014 9:49:48 853364606 192.168.12.108 - 0 0 0.241 420317720/small.mp4 - 0 - - 26469936 596.544 853364606 -
420317720 - - - 9/17/2014 9:50:07 853364606 192.168.12.108 - 0 817893 18.786 420317720/small.mp4 1 18458 817893 0 0 596.544 - -
420317720 - - - 9/17/2014 9:50:07 853364606 192.168.12.108 - 0 817893 18.863 420317720/small.mp4 1 18458 817893 0 0 596.544 - -
420317720 INFO rtsp disconnect 9/17/2014 9:50:07 853364606 192.168.12.108 - 0 0 18.971 - - - - - - - 853364606 -

```

Then I blindly try to disable the INFO logging in our custom module, then the logging is fine. That’s weird, it’s like the logging in the custom module has somehow messed up with Wowza’s logging.

Here’s how i defined the logger in the custom module:

```auto
public static final WMSLogger logger = WMSLoggerFactory.getLogger(HTTPRandomAccessReader.class);

```

Here’s the original logging in the module:

```auto
    if (logger.isInfoEnabled())
	logger.info("HTTPRandomAccessReader.init: status:" + this.status + " length:" +
		this.length + " lastModified:" + this.lastModified);

```

Any idea? Appreciate for any insight, thanks!

---

<div class="post-metadata">

### Author: ![Andrew\_Kennedy1](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew\_Kennedy1](https://community.wowza.com/u/Andrew_Kennedy1)
#### Post date: [October 10, 2014, 11:30am UTC](https://community.wowza.com/t/missing-values-in-log-fields-in-stats-log/35699/2 "2014-10-10T11:30:21Z")

</div>

Hi,

In your logger statement you do not specify the category or the event, so see the API there are multiple .info definitions so you are using

getLogger().info(comment)

but you could use

getLogger().info(comment, category, event)

Example your logger line would change from

```auto
    if (logger.isInfoEnabled())
	logger.info("HTTPRandomAccessReader.init: status:" + this.status + " length:" +
		this.length + " lastModified:" + this.lastModified);

```

to

```auto
    if (logger.isInfoEnabled())
	logger.info("HTTPRandomAccessReader.init: status:" + this.status + " length:" +
		this.length + " lastModified:" + this.lastModified,WMSLoggerIDs.CAT_application, WMSLoggerIDs.EVT_comment);

```

Andrew.

---

<div class="post-metadata">

### Author: ![Shoo\_Kyuk\_Wei](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@Shoo\_Kyuk\_Wei](https://community.wowza.com/u/Shoo_Kyuk_Wei)
#### Post date: [October 13, 2014, 2:12pm UTC](https://community.wowza.com/t/missing-values-in-log-fields-in-stats-log/35699/3 "2014-10-13T14:12:22Z")

</div>

Ah Andrew, thanks! I will give this a try later on 🙂 Let’s see if this will work 😃

---

<div class="post-metadata">

### Author: ![Shoo\_Kyuk\_Wei](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@Shoo\_Kyuk\_Wei](https://community.wowza.com/u/Shoo_Kyuk_Wei)
#### Post date: [December 23, 2014, 5:49pm UTC](https://community.wowza.com/t/missing-values-in-log-fields-in-stats-log/35699/4 "2014-12-23T17:49:01Z")

</div>

Unfortunately that does not work as well =(

We have a custom module, and some simple INFO logging in, I don’t understd why is it affects only RTSP streams… frustrated.

I tried removing all the logging in our custom module, then the problem would be gone. But why? I don’t want to remove the logging as they would be helpful during runtime. Please shed some light? Thanks!
