# Wowza logging via rsyslog?

**URL:** https://community.wowza.com/t/wowza-logging-via-rsyslog/37882
**Category:** Wowza Streaming Engine
**Tags:** server-administration
**Created:** [April 2, 2012, 1:33pm UTC](https://community.wowza.com/t/wowza-logging-via-rsyslog/37882 "2012-04-02T13:33:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Mahoney1](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@Daniel\_Mahoney1](https://community.wowza.com/u/Daniel_Mahoney1)
#### Post date: [April 2, 2012, 1:33pm UTC](https://community.wowza.com/t/wowza-logging-via-rsyslog/37882/1 "2012-04-02T13:33:23Z")

</div>

Has anyone had any success getting Wowza (therefor log4j) to send messages to a remote logging server? We generally run multiple worker instances in a load balanced configuration, killing off unneeded workers when load drops off, and having to move their log files to a central point before terminating gets to be quite a chore. I’m thinking it would be a lot more convenient to have all workers log to a central rsyslogd machine. Unfortunately there doesn’t seem to be a lot of information available on doing this.

Has anybody implemented this solution before? If so, how did you go about making it work?

---

<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: [April 2, 2012, 7:37pm UTC](https://community.wowza.com/t/wowza-logging-via-rsyslog/37882/2 "2012-04-02T19:37:36Z")

</div>

The /conf/log4j.properties file has a commented out UDP appender. I don’t have any experience with it, however

Richard

---

<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: [April 20, 2012, 2:44pm UTC](https://community.wowza.com/t/wowza-logging-via-rsyslog/37882/3 "2012-04-20T14:44:30Z")

</div>

Very cool. Thank you for this great howto write-up. I will try it out.

Richard

---

<div class="post-metadata">

### Author: ![Daniel\_Mahoney1](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@Daniel\_Mahoney1](https://community.wowza.com/u/Daniel_Mahoney1)
#### Post date: [April 20, 2012, 8:35am UTC](https://community.wowza.com/t/wowza-logging-via-rsyslog/37882/4 "2012-04-20T08:35:15Z")

</div>

That would work, but since we bill customers based upon our log contents I really was looking for a solution that would use TCP.

The solution I finally developed was to use rsyslog. I designated one of my lightly-loaded EC2 instances to be by rsyslog server, and in it’s rsyslog.conf I included:

$ModLoad imtcp # loads the tcp module

$InputTCPServerRun 514 # defines what port to listen on

$EscapeControlCharactersOnReceive off # Prevents rsyslog from turning tab into #011

$template WowzaFormat,"%TIMESTAMP% %fromhost-ip% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n" # Defines log line format

$ActionFileDefaultTemplate WowzaFormat

local1.\* /var/log/wowza.log # Specifies that all messages for facility “local1” get written to wowza log file

Then on my worker instances I set up the rsyslog.conf with:

$InputFileName /usr/local/WowzaMediaServer/logs/wowzamediaserver\_access.log

$InputFileTag wowzaAccess:

$InputFileStateFile statefile\_access

#$InputFileSeverity info

$InputFileFacility local1

$InputRunFileMonitor

local1.\* @@

#$ActionFileDefaultTemplate RSYSLOG\_TraditionalFileFormat

$template WowzaFormat,"%TIMESTAMP% %fromhost-ip% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"

$ActionFileDefaultTemplate WowzaFormat

This setup has been working well for us for a couple of weeks now. I describe the setup process in a little more detail in my blog ( [http://www.streemit.net/2012/04/20/remote-logging-for-wowza/](http://www.streemit.net/2012/04/20/remote-logging-for-wowza/)) but the basic info included here should provide enough to get you started if you find that you need to centralize your Wowza logs too.

---

<div class="post-metadata">

### Author: ![Rob\_Burton](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@Rob\_Burton](https://community.wowza.com/u/Rob_Burton)
#### Post date: [October 17, 2017, 11:03pm UTC](https://community.wowza.com/t/wowza-logging-via-rsyslog/37882/5 "2017-10-17T23:03:35Z")

</div>

You could try NXLog instead of rsyslog, here’s a quick comparison about why:

[https://nxlog.co/products/nxlog-community-edition/why](https://nxlog.co/products/nxlog-community-edition/why)
