Packagecom.smartfoxserver.v2.logging
Classpublic class Logger
InheritanceLogger Inheritance flash.events.EventDispatcher

The internal logger used by the SmartFoxServer 2X client API. This is a singleton class.

You can get a reference to the Logger by means of the SmartFox.logger property. Accessing the logger can be useful to control the client-side logging level, enable or disable the output towards the Adobe Flash or Flash/Flex Builder console and enable or disable the events dispatching. When logger events are enabled, you can add your own listeners to this class, in order to have a lower access to logged messages (for example you could display them in a dedicated panel in the application interface).

See also

LoggerEvent
SmartFox.logger


Public Properties
 PropertyDefined By
  enableConsoleTrace : Boolean
Indicates whether or not the output of logged messages to the console window of Adobe Flash and Flex/Flash Builder is enabled.
Logger
  enableEventDispatching : Boolean
Indicates whether dispatching of log events is enabled or not.
Logger
  loggingLevel : int
Determines the current logging level.
Logger
Events
 Event Summary Defined By
  Dispatched when a message of level DEBUG is logged.Logger
  Dispatched when a message of level ERROR is logged.Logger
  Dispatched when a message of level INFO is logged.Logger
  Dispatched when a message of level WARN is logged.Logger
Property Detail
enableConsoleTraceproperty
enableConsoleTrace:Boolean

Indicates whether or not the output of logged messages to the console window of Adobe Flash and Flex/Flash Builder is enabled.


Implementation
    public function get enableConsoleTrace():Boolean
    public function set enableConsoleTrace(value:Boolean):void
enableEventDispatchingproperty 
enableEventDispatching:Boolean

Indicates whether dispatching of log events is enabled or not.


Implementation
    public function get enableEventDispatching():Boolean
    public function set enableEventDispatching(value:Boolean):void

See also

loggingLevelproperty 
loggingLevel:int

Determines the current logging level. Messages with a level lower than this value are not logged. The available log levels are contained in the LogLevel class.


Implementation
    public function get loggingLevel():int
    public function set loggingLevel(value:int):void

See also

Event Detail
debug Event
Event Object Type: com.smartfoxserver.v2.logging.LoggerEvent
LoggerEvent.type property = com.smartfoxserver.v2.logging.LoggerEvent.DEBUG

Dispatched when a message of level DEBUG is logged. The enableEventDispatching property must be true.

The LoggerEvent.DEBUG constant defines the value of the type property of the event object for a debug event.

The properties of the params object contained in the event object have the following values:

PropertyTypeDescription
messageStringThe logged debug message.

See also

error Event  
Event Object Type: com.smartfoxserver.v2.logging.LoggerEvent
LoggerEvent.type property = com.smartfoxserver.v2.logging.LoggerEvent.ERROR

Dispatched when a message of level ERROR is logged. The enableEventDispatching property must be true.

The LoggerEvent.ERROR constant defines the value of the type property of the event object for a error event.

The properties of the params object contained in the event object have the following values:

PropertyTypeDescription
messageStringThe logged error message.

See also

info Event  
Event Object Type: com.smartfoxserver.v2.logging.LoggerEvent
LoggerEvent.type property = com.smartfoxserver.v2.logging.LoggerEvent.INFO

Dispatched when a message of level INFO is logged. The enableEventDispatching property must be true.

The LoggerEvent.INFO constant defines the value of the type property of the event object for a info event.

The properties of the params object contained in the event object have the following values:

PropertyTypeDescription
messageStringThe logged information message.

See also

warn Event  
Event Object Type: com.smartfoxserver.v2.logging.LoggerEvent
LoggerEvent.type property = com.smartfoxserver.v2.logging.LoggerEvent.WARN

Dispatched when a message of level WARN is logged. The enableEventDispatching property must be true.

See also