tags:

views:

527

answers:

3

Hi. I'm reading this tutorial on how to build my project project using eclipse with the red5 eclipse plugin. the problem is that this tutorial is for version 0.6 and i have version 0.9.

the tutorial is at: http://www.actionscript.org/resources/articles/615/1/Getting-started-with-red5-server/Page1.html

On page 2 that tutorial explains about logging information to the log file using the following imported classes:

import org.apache.commons.logging.Log; 
import org.apache.commons.logging.LogFactory; 

then the tutorial explains to add the jar red5/lib/commons-logging-1.1.jar to the build path of eclipse but the problem is that this file does not exist.

the only jar files that contain the word log are:

  1. log4j-over-slf4j-1.5.8.jar
  2. logback-classic-0.9.17.jar
  3. logback-core-0.9.17.jar

what exactly do i do to log using red5 0.9 ? thanks!

+1  A: 

ok red5 0.9 just uses log4j. needed to import import org.apache.log4j.Logger; after adding log4j-over-slf4j-1.5.8.jar to the external jars list in eclipse.

good log4j tutorial: http://www.laliluna.de/log4j-tutorial.html

ufk
it seems that red5 also supports logback
ufk
+1  A: 

make sure you have the folder Program Files\Red5\logs

in that folder you place an empty file called red5.log

now in your java, every time you want a line to be written in your logfile you write

log.error( "Your description ");

if you want to pass variables to the logfile (to see the value)

log.error( "reading file : " + filename );

All of this does not need imports of any kind. Red5 logging is already in there !

Wim
+1  A: 

This link from the Red5 website provides some more detailed instructions in order to get logging working with version 0.9 of the Red5 server.

PhillC