[Red5devs] [red5 commit] r3069 - java/server/trunk/src/org/red5/server

codesite-noreply at google.com codesite-noreply at google.com
Thu Sep 18 20:15:12 PDT 2008


Author: mondain
Date: Thu Sep 18 20:14:38 2008
New Revision: 3069

Modified:
    java/server/trunk/src/org/red5/server/Standalone.java

Log:
Updated to use Red5 logger context selector

Modified: java/server/trunk/src/org/red5/server/Standalone.java
==============================================================================
--- java/server/trunk/src/org/red5/server/Standalone.java	(original)
+++ java/server/trunk/src/org/red5/server/Standalone.java	Thu Sep 18  
20:14:38 2008
@@ -37,16 +37,19 @@
   * @author Luke Hubbard, Codegent Ltd (luke at codegent.com)
   */
  public class Standalone {
-
-    /**
-     * Initialize Logging.
-     */
-    protected static Logger log =  
LoggerFactory.getLogger(Standalone.class);

  	protected static String red5Config = "red5.xml";

  	//public static DebugPooledByteBufferAllocator allocator;

+	static {
+		//set to use our logger
+		 
System.setProperty("logback.ContextSelector", "org.red5.logging.LoggingContextSelector");
+		
+		//install the slf4j bridge (mostly for JUL logging)
+		SLF4JBridgeHandler.install();
+	}
+	
  	/**
       * Re-throws exception
       * @param e               Exception
@@ -67,9 +70,6 @@
       * @throws Throwable    Base type of all exceptions
  	 */
  	public static void main(String[] args) throws Throwable {
-
-		//install the slf4j bridge (mostly for JUL logging)
-		SLF4JBridgeHandler.install();
  		
  		//System.setProperty("DEBUG", "true");

@@ -85,6 +85,10 @@
  		}

  		long t1 = System.nanoTime();
+		
+		//we create the logger here so that it is instanced inside the expected
+		//classloader
+		Logger log = LoggerFactory.getLogger(Standalone.class);

  		log.info("{} (http://www.osflash.org/red5)", Red5.getVersion());
  		log.info("Loading Red5 global context from: {}", red5Config);



More information about the Red5devs mailing list