com.vaadin.terminal.gwt.client.


Class VConsole

java.lang.Object
  com.vaadin.terminal.gwt.client.VConsole

public class VConsole
extends Object

A helper class to do some client side logging.

This class replaces previously used loggin style: ApplicationConnection.getConsole().log("foo").

The default widgetset provides three modes for debugging:

  • NullConsole (Default, displays no errors at all)
  • VDebugConsole ( Enabled by appending ?debug to url. Displays a floating console in the browser and also prints to browsers internal console (builtin or Firebug) and GWT's development mode console if available.)
  • VDebugConsole in quiet mode (Enabled by appending ?debug=quiet. Same as previous but without the console floating over application).

Implementations can be customized with GWT deferred binding by overriding NullConsole.class or VDebugConsole.class. This way developer can for example build mechanism to send client side logging data to a server.

Note that logging in client side is not fully optimized away even in production mode. Use logging moderately in production code to keep the size of client side engine small. An exception is GWT.log(String) style logging, which is available only in GWT development mode, but optimized away when compiled to web mode. TODO improve javadocs of individual methods

Constructor Summary
VConsole()
           
 
Method Summary
static void dirUIDL(ValueMap u, ApplicationConfiguration cnf)
           
static void error(String msg)
           
static void error(Throwable e)
           
static void log(String msg)
           
static void log(Throwable e)
           
static void printLayoutProblems(ValueMap meta, ApplicationConnection applicationConnection, Set<Paintable> zeroHeightComponents, Set<Paintable> zeroWidthComponents)
           
static void printObject(Object msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VConsole

public VConsole()
Method Detail

log

public static void log(String msg)

log

public static void log(Throwable e)

error

public static void error(Throwable e)

error

public static void error(String msg)

printObject

public static void printObject(Object msg)

dirUIDL

public static void dirUIDL(ValueMap u,
                           ApplicationConfiguration cnf)

printLayoutProblems

public static void printLayoutProblems(ValueMap meta,
                                       ApplicationConnection applicationConnection,
                                       Set<Paintable> zeroHeightComponents,
                                       Set<Paintable> zeroWidthComponents)