Class Level
The Level (Log Level).
Levels used for identifying the severity of an event.
Every standard Level has a Color by default.
Subclassing 'Object'.
-
level.StdIntLevel
-
Standard Int Levels.
Fields:
- ALL
math.huge
- TRACE
600
- DEBUG
500
- INFO
400
- WARN
300
- ERROR
200
- FATAL
100
- OFF
0
-
level.StdLevelColor
-
Standard Level Colors.
Fields:
- ALL
color_white
- TRACE
139 145 233
- DEBUG
0 255 255
- INFO
0 255 0
- WARN
255 255 0
- ERROR
255 0 0
- FATAL
255 48 48
- OFF
color_black
-
level.StdLevel
-
Standard Logging Levels as a table.
Fields:
- ALL
All events should be logged.
- TRACE
A fine-grained debug message, typically capturing the flow through the game.
- DEBUG
A general debugging event.
- INFO
An event for informational purposes.
- WARN
An event that might possible lead to an error.
- ERROR
An error in game, possibly recoverable.
- FATAL
A severe error that will prevent the game from continuing.
- OFF
No events will be logged.
-
level.getCustomLevel ()
-
Get the Custom Levels as a table.
Returns:
table customLevel
-
level.forName (name, int)
-
Retrieves an existing CustomLevel or creates one if it didn't previously exist.
If the CustomLevel matching the provided name already exists, it's intlevel will be overrode.
Parameters:
- name
The Level's name
- int
The Level's intlevel
Returns:
object level
-
level:IntLevel ()
-
Get the Level's intlevel.
Returns:
int intlevel
-
level:GetColor ()
-
Get the Level's Color.
Returns:
Color color
-
level:IsInRange (l1, l2)
-
Compares the Level against the Levels passed as arguments and returns true if this level is in between the given levels.
Parameters:
- l1
The Level with a certain intlevel
- l2
The Level with another intlevel
Returns:
bool isinrange