Logger
Constructor Summary
Public Constructor | ||
public |
constructor(level: String | null) Default constructor |
Method Summary
Public Methods | ||
public |
consoleLog(message: String, rest: Object) Helpter function format the console.log message |
|
public |
Put a debug level message into the developer console, will only show up in debug level |
|
public |
Put an error level message into the developer console, will only show up if there is some level specified |
|
public |
Given the name of the class this is for return the previously associated color or associate a random color to this class name |
|
public |
Put a information level message into the developer console, will only show up in debug or info level |
|
public |
lightOrDark(color: String): String Figure out whether to return white or black text color for the given background colorMatch |
|
public |
Pads the end of a string with the value if the String.prototype doesn't exist This is particularly for CircleCI which keeps failing :( and always uses the proptotype if it exists |
|
public |
Generate a random color within the acceptable 256 color range |
Public Constructors
Public Methods
public consoleLog(message: String, rest: Object) source
Helpter function format the console.log message
Params:
Name | Type | Attribute | Description |
message | String | the first variable passed to the console.log, generally a message
formatted as |
|
rest | Object | an array of the rest of the variables passed to the console.log, typically class instances or variables in the file used for debugging |
public debug(message: String, rest: Object) source
Put a debug level message into the developer console, will only show up in debug level
Params:
Name | Type | Attribute | Description |
message | String | the first variable passed to the console.log, generally a message
formatted as |
|
rest | Object | an array of the rest of the variables passed to the console.log, typically class instances or variables in the file used for debugging |
public error(message: String, stacktrace: Object, rest: Object) source
Put an error level message into the developer console, will only show up if there is some level specified
Params:
Name | Type | Attribute | Description |
message | String | the first variable passed to the console.log, generally a message
formatted as |
|
stacktrace | Object | the error stack trace |
|
rest | Object | an array of the rest of the variables passed to the console.log, typically class instances or variables in the file used for debugging |
public getColors(className: String): {bgcolor: String, textcolor: String} source
Given the name of the class this is for return the previously associated color or associate a random color to this class name
Params:
Name | Type | Attribute | Description |
className | String | the name of the class this log message is for |
public info(message: String, rest: Object) source
Put a information level message into the developer console, will only show up in debug or info level
Params:
Name | Type | Attribute | Description |
message | String | the first variable passed to the console.log, generally a message
formatted as |
|
rest | Object | an array of the rest of the variables passed to the console.log, typically class instances or variables in the file used for debugging |
public lightOrDark(color: String): String source
Figure out whether to return white or black text color for the given background colorMatch
Params:
Name | Type | Attribute | Description |
color | String | the hexcode color without a # mark in front of it |