.
 

Logging Library – Example Application

During the development process, you will often need to know what is happening under the hood of your application. Luckily for you, this can be done with our powerful Logger utility. The Logging Library is an internal login utility which helps keep track on development in run-time.

The API of the Logger can be found here:

6rounds API documentation

There are several flash debugging applications out there and with Logger you can use each and  every one of them.

In this example we will use a MonsterDebugger (which is pretty cool). You can download it here: http://www.demonsterdebugger.com/ If you prefer Alcon or Arthopod please download those now.

We will use our template application as a start.

download template

Open LoggerMain class, and import Logger related stuff.

 import com.gixoo.utils.logger.*;
 import nl.demonsters.debugger.MonsterDebugger;
 
 private var log : Logger;
 private var debugger : MonsterDebugger;

add this code to the class :

private function initLogger() : void {
	// Initialize De MonsterDebugger
	debugger = new MonsterDebugger(this);
	/**
	 * Uncoment each line for different logging levels.
	 * Leaving all the lines commented will log all messages.
	 */
	//Logger.getInstance().setLevel(Logger.FATAL);
	//Logger.getInstance().setLevel(Logger.ERROR);
	//Logger.getInstance().setLevel(Logger.WARN);
	//Logger.getInstance().setLevel(Logger.DEBUG);
 
	Logger.getInstance().addEventListener(LogEvent.LOG, handleLog);	
}

And call initLogger() at the constructor.

Now, when you run your test application you will see a lot of traces in MonsterDebugger.
All the stuff you see is cursor follow activity.

The cool thing about Logger is that you can set a level of information that you would like to receive.

If you uncoment this this line :

Logger.getInstance().setLevel(Logger.INFO);

in initLogger() function you will receive only INFORMATION messages from the Logger.
Logger level can be set to one of five values. They are: FATAL, ERROR, WARN, INFO and DEBUG

I encourage you to find more about it here:

6rounds API documentation

Have fun!
 

Related Posts

  1. Chat Translator – Example Application
  2. Tutorial 2 – Using rounds Application Template
  3. Tutorial 3 – Local Testing for your multi-user application
  4. Video Chat Rounds – Our New Facebook Application
  5. rounds Downloads and Examples

video chat rounds

2 Comments

  1. [...] Logging Library – The Logging Library is an internal login utility which helps keep track on development in run-time. [...]

  2. [...] Logging Library – Example Application [...]

Leave a Comment


«
»