qnx.system.Logger

Logger

Properties | Methods | Constants


Packageqnx.system
Classpublic class Logger
InheritanceLogger Inheritance Object



Class information:
BlackBerry 10 Version:   10.0.0



Public Properties

 PropertyDefined By
  id : String
[read-only] The id associated with the Logger
Logger
  logger : Logger
[static] Default logger object
Logger

Public Methods

 MethodDefined By
  
Logger(id:String)
Logger
  
log(level:int, ... args):Boolean
Log a message.
Logger
  
setLogLevel(minLevel:int):void
Set the minimum log level required for a message to be logged.
Logger
  
updateLogLevels(minLevel:int, expr:String):void
[static] Update the minimum log level of all Logger instances whose id matches the given regular expression.
Logger
  
wouldLog(level:int):Boolean
Returns an indication if a message of the indicated level would be logged.
Logger

Public Constants

 ConstantDefined By
  DEBUG : int = 0
[static] Log level indicating debugging messages.
Logger
  EMERGENCY : int = 4
[static] Log level indicating error messages.
Logger
  ERROR : int = 3
[static] Log level indicating error messages.
Logger
  INFO : int = 1
[static] Log level indicating informational messages.
Logger
  WARNING : int = 2
[static] Log level indicating warning messages.
Logger

Property Detail

id


id:String  [read-only]

The id associated with the Logger


Implementation

public function get id():String

logger


logger:Logger

Default logger object


Implementation

public static function get logger():Logger
public static function set logger(value:Logger):void

Constructor Detail

Logger()


public function Logger(id:String)



Parameters

id:String

Method Detail

log()


public function log(level:int, ... args):Boolean

Log a message. If the level is at least equal to the minimum log level the message is logged both as a normal ActionScript trace message and using the AIR logging facilities.

Parameters

level:int — Log level. The value of this can range between Logger.DEBUG and Logger.EMERGENCY.
... args

Returns

Boolean — Returns true if the message was logged.

setLogLevel()


public function setLogLevel(minLevel:int):void

Set the minimum log level required for a message to be logged. The value of this can range between Logger.DEBUG and Logger.EMERGENCY.

Parameters

minLevel:int — Minimum log level

updateLogLevels()


public static function updateLogLevels(minLevel:int, expr:String):void

Update the minimum log level of all Logger instances whose id matches the given regular expression. This will also affect Logger instances created in the future.

Parameters

minLevel:int — The value to set as the minimum log level for any Logger instance that matched the regular expression.
expr:String

wouldLog()


public function wouldLog(level:int):Boolean

Returns an indication if a message of the indicated level would be logged. This might be used to avoid performing potentially expensive processing for the purposes of logging if the final result would have no effect.

Parameters

level:int — Log level. The value of this can range between Logger.DEBUG and Logger.EMERGENCY.

Returns

Boolean — Returns true if a message of the indicated level would be logged.

Constant Detail

DEBUG


public static const DEBUG:int = 0

Log level indicating debugging messages. By default, messages logged with this level are not output.

EMERGENCY


public static const EMERGENCY:int = 4

Log level indicating error messages. These are logged by default and are intended to indicate catastrophic problems.

ERROR


public static const ERROR:int = 3

Log level indicating error messages. These are logged by default and are intended to indicate serious problems.

INFO


public static const INFO:int = 1

Log level indicating informational messages. These are logged by default and are intended to indicate information that is wanted in logs but is likely normal operation.

WARNING


public static const WARNING:int = 2

Log level indicating warning messages. These are logged by default and are intended to indicate minor problems.





comments powered by Disqus