Hi ive prob asked before and i still cant manage to work out how to do it after finding out everything to do with log4j properties and spring. My rolling file appender for a webapp is log information from the red5 server and internals, and also from another webapp. Im trying to get a webapp to log its own data, i even spent the time to create a subclassed logger and custom level class, and even set the threshold to this level, and still its outputting alot of unwanted logs. There is absolute nowhere i can find to stop this ive spent 2 days finding out :)

Here is my log properties, i basically want all log levels sent via a custom level StatsLevel.STATS to go to its own rolling file appender. The idea is to firstly on app start add a list of the log fields to the top of the file, then on each app disconnection or closure by a client an array of information is then joined and seperated by a tab. Im still trying to find a more elegant way of doing this by subclassing the patterlayout. I also want other normal log information to go to another file like logs from red5 about the currently application adatptor.

Object[] data = "" conn.getConnectParams().get("swfUrl"),
                conn.getConnectParams().get("pageUrl"), stream.getStreamFlow().getClientTimeBuffer(),
                stream.getStreamFlow().getTotalStreamTime(), conn.getPath(),
                conn.getScope().getName(), stream.getBandwidthConfigure().getOverallBandwidth(),
                stream.getBandwidthConfigure().getOverallBandwidth(), conn.getType(),
                conn.getConnectParams().get("tcUrl"), date.format(new Date()), time.format(new Date()),
                conn.getSessionId(),conn.getRemoteAddress(), conn.getRemotePort(), conn.getHost(),
                conn.getClient().getCreationTime(), conn.getLastPingTime(), conn.getWrittenBytes(),
                stream.getStreamFlow().getTotalBytesTransfered(), conn.getClient().getAttribute("os"),
                conn.getClient().getAttribute("manufacturer"), conn.getClient().getAttribute("type"),
                conn.getClient().getAttribute("lang"), conn.getClient().getAttribute("res")};
       
        statsLog.stats(dumpLogData(data));





log4j.loggerFactory=org.red5.server.logs.StatsLoggerFactory

log4j.rootLogger=STATS#org.red5.server.logs.StatsLevel, VOD

log4j.appender.VOD=org.apache.log4j.DailyRollingFileAppender
log4j.appender.VOD.File=${vod.root}/logs/paysiteVOD.log
log4j.appender.VOD.DatePattern='.'yyyy-MM-dd
log4j.appender.VOD.Threshold=STATS
log4j.appender.VOD.layout=org.apache.log4j.PatternLayout
log4j.appender.VOD.layout.ConversionPattern=%m

log4j.logger.VODApplication=STATS#org.red5.server.logs.StatsLevel
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to