Changing default Logs Dir in log4j.properties

I’m quite a newbie, using Wowza Media Server Pro10 1.7.0 build12081.

I have edited the log4j.properties file and notice that log files

are created (per application basis) in relation to the install-dir

parameter which by default on my Red-Hat Based system is:

/usr/local/WowzaMediaServerPro-1.7.0

Therefore, according to this line in log4j.properties:

[install-dir]/logs/[vhost]/[application]/wowzamediaserverpro_access.log

My logs are getting written to a directory beneath /usr/local/WowzaMediaServerPro-1.7.0

How can I change the location of where log files are written?

The desired directory would be:

/home/vhost/steve-test/applications/shoutcast/logs

or something like that.

Thanks,

Stephen Matteson

It is this line:

log4j.appender.${com.wowza.wms.context.VHost}_${com.wowza.wms.context.Application}_access.File=${com.wowza.wms.ConfigHome}/logs/${com.wowza.wms.context.VHost}/${com.wowza.wms.context.Application}/wowzamediaserver_access.log

If you want to change the root location just substitute this part:

${com.wowza.wms.ConfigHome}/logs

For the desired location. You may need to play around with it a little to get the variables in all the right spots for what you are looking for. It is hard to tell exactly from your description how you want it to work.

Charlie

I really don’t have specific docs for this. It is fairly straight forward. First, just edit conf/log4j.properties and uncommand the per-application and per-vhost logging sections of this files. I think this is very clearly marked in the files. Then you can modify the out location using File property of each of the appenders. You can use variable as follows:

For both per-application and per-vhost you can use the variables:

${com.wowza.wms.ConfigHome} - Configuration home directory
${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory

For per-vhost:

${com.wowza.wms.context.VHost} - vhost name

for per-application:

${com.wowza.wms.context.VHost} - vhost name
${com.wowza.wms.context.Application} - application name

It should be a piece of cake.

Charlie

Upon further consideration, I would like to output logging to two

different directories, and keep the Wowza Logging

“as is” under /usr/local/WowzaMediaServerPro-1.7.0.

These logs would be protected for System Administrator use.

For customer access and download, I would like to implement

per vhost and application logging in a different directory.

The directories would be readable and perhaps writable by the user.

So, for the vhost “steve-test”, I would like vhost logging to appear here:

/home/vhost/steve-test/logs

and per application logging (for shoutcast) to be located here:

/home/vhost/steve-test/applications/shoutcast/logs

If this sounds like a common implementation of logging for Wowza, hopefully you can point me to an existing tutorial, or some examples of this configuration.

Thank you!

Stephen Matteson