Wowza Community

log4j custom category name

Hi,

There is a little but annoying problem with custom category names in log4j.

My goal is to filter logger output to show only output from my modules.

I have the following code:

WMSLoggerFactory.getLoggerObj(appInst).info("my comment blah blah", "ether", "comment", 200, appInst.getApplication().getName()+"/"+appInst.getName());

Then, in log4j.properties I write:

log4j.appender.ether.layout.CategoryInclude=ether

But log4j not allows this, sending following to stderr:

Log file configuration error: Invalid category name in CategoryInclude: ether

At the moment, I use this workaround:

log4j.appender.ether.layout.CategoryExclude=vhost,server,application,stream,session

But it not seems to be a good way.

Can somebody tell me where to dig?

Hi heronman,

Although you can add custom categories to the logs as needed, these categories are defined elsewhere. So when you invoke CategoryInclude, it checks against this pre-defined list.

https://www.wowza.com/docs/how-to-configure-vhost-and-application-context-logging

Michelle