Config

config
private CLASS
 

Class Description

Provides access to configuration values defined in assets/app.config.

app.config should be a valid JSON file stored under the assets/ directory.

A simple example might look like the following:

{
  "app_version": "1.0.0",
  "log_level": "DEBUG",
  "my_string": "string value",
  "my_number": 123.456,
  "my_integer": 789
}
 

Listing

 

Fields

 

Properties

logLevel():LogLevel
static
read only
Verbosity level to be used for the logging system.
fileContents():String
static
read only
Raw contents of the app.config file.
appVersion():String
static
read only
App version string.
 

Methods

refresh():void
static
Reload the config values from file.
getString(key:String):String
static
Retrieve an arbitrary string value from app.config.
getNumber(key:String):Number
static
Retrieve an arbitrary number value from app.config.
getInteger(key:String):Number
static
Retrieve an arbitrary integer value from app.config.
 

Details

 

Fields

 

Properties

 

logLevel
static
read only

public static logLevel():LogLevel

Verbosity level to be used for the logging system.

 

fileContents
static
read only

public static fileContents():String

Raw contents of the app.config file.

 

appVersion
static
read only

public static appVersion():String

App version string.

 

Methods

 

refresh()
static

public static function refresh():void

Reload the config values from file.

 

getString()
static

public static function getString(key:String):String

Retrieve an arbitrary string value from app.config.

key:String

The key to retrieve a string value for

returns
String

The string value for the provided key

 

getNumber()
static

public static function getNumber(key:String):Number

Retrieve an arbitrary number value from app.config. Note: the number must be defined with a decimal point.

key:String

The key to retrieve a number value for

returns
Number

The number value for the provided key

 

getInteger()
static

public static function getInteger(key:String):Number

Retrieve an arbitrary integer value from app.config.

key:String

The key to retrieve an integer value for

returns
Number

The integer value for the provided key

 

 

 

 

 

 

 

 

 

 

log-ls 2018 pixeldroid
https://github.com/pixeldroid/log-ls
generated with lsdoc v1.0.0 (https://github.com/pixeldroid/lsdoc)