Package | com.smartfoxserver.v2.logging |
Class | public class Logger |
Inheritance | Logger flash.events.EventDispatcher |
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
Property | Defined 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 |
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 |
enableConsoleTrace | property |
enableConsoleTrace:Boolean
Indicates whether or not the output of logged messages to the console window of Adobe Flash and Flex/Flash Builder is enabled.
public function get enableConsoleTrace():Boolean
public function set enableConsoleTrace(value:Boolean):void
enableEventDispatching | property |
enableEventDispatching:Boolean
Indicates whether dispatching of log events is enabled or not.
public function get enableEventDispatching():Boolean
public function set enableEventDispatching(value:Boolean):void
See also
loggingLevel | property |
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.
public function get loggingLevel():int
public function set loggingLevel(value:int):void
See also
debug | Event |
com.smartfoxserver.v2.logging.LoggerEvent
com.smartfoxserver.v2.logging.LoggerEvent.DEBUG
Dispatched when a message of level DEBUG is logged.
The enableEventDispatching property must be true
.
The properties of the params object contained in the event object have the following values:
Property | Type | Description |
---|---|---|
message | String | The logged debug message. |
See also
error | Event |
com.smartfoxserver.v2.logging.LoggerEvent
com.smartfoxserver.v2.logging.LoggerEvent.ERROR
Dispatched when a message of level ERROR is logged.
The enableEventDispatching property must be true
.
The properties of the params object contained in the event object have the following values:
Property | Type | Description |
---|---|---|
message | String | The logged error message. |
See also
info | Event |
com.smartfoxserver.v2.logging.LoggerEvent
com.smartfoxserver.v2.logging.LoggerEvent.INFO
Dispatched when a message of level INFO is logged.
The enableEventDispatching property must be true
.
The properties of the params object contained in the event object have the following values:
Property | Type | Description |
---|---|---|
message | String | The logged information message. |
See also
warn | Event |
com.smartfoxserver.v2.logging.LoggerEvent
com.smartfoxserver.v2.logging.LoggerEvent.WARN
Dispatched when a message of level WARN is logged.
The enableEventDispatching property must be true
.
See also