W3CLogging Library and Example (RED5 Example Applications) Added: 21/11/09 10:51 AM (Nine months, twenty-two days, six hours, forty-three minutes, thirty-six seconds ago) Rating(0) Viewed(1567) Files(1)
loggingTest is a demo Red5 application (Red5Plugin project) to demonstrate server streaming logging into W3C log files and possibly socket and databases in the future.
Error: Failed to load processor NoteBox
No macro or processor named 'NoteBox' found
The server logging is enabled by making the application adaptor extend org.red5.server.adapter.StatisticsApplicationAdaptor? and then adding a log instance as a bean reference in the web.xml file.
The system works by using the scope name to determine which logger to use and will log to a directory of the same name as the scope name. The log files will append and rollover using a date filename pattern string.
The loggers can be preloaded on application startup if required also.
Configuration
Application adaptor must org.red5.server.adapter.StatisticsApplicationAdaptor? which produces the log events for each stream event like so
public class Application extends StatisticsApplicationAdaptor {
....
The logger bean must be configured in red5-web.xml with a reference name streamStatisticsLog (cannot get it to reference the ILogger interface as yet.) like so
- logPath - The setting to the logPath with string formatting for the scope name log/loggingTest/%s/ where %s is the scope name.
- immediateFlush - Flush the logger immediately or buffer it.
- bufferedIo - Buffer the logger, logs will buffer if set. (logs will be lost in buffer if server reboots, maybe need a shutdown method ?)
- bufferSize - The ammount to buffer before flushing the logs to the log file.
- events - Filter to these events only. Available events are connect,disconnect,server-start,server-stop,app-start,app-stop,
app-connect,app-join,app-leave,app-disconnect,room-start,room-stop,
room-connect,room-join,room-leave,room-disconnect,publish,unpublish,
record,recordstop,play,stop,paquse,resume,seek
- categories - Filter to these categories only. Available categories are session,stream,server,application.