Methods
(static) initializeLoggingOverviews(gameInstancesByGameCode, gameInstancesByPlayerUUID)
Starts interval to print overview to log every X amount of time
Parameters:
| Name | Type | Description |
|---|---|---|
gameInstancesByGameCode |
Record.<number, Types.GameInstance> | drilled arg |
gameInstancesByPlayerUUID |
Record.<Types.UUID, Types.GameInstance> | drilled arg |
- Source:
(static) log(logMessage, infoopt)
Styles and displays message along with its attached identifiers
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
logMessage |
string | central message to log | |
info |
Object |
<optional> |
optional variants and additional identifying information |
- Source:
(inner) getConnectionFragment(webSocketConnection) → {string}
Constructs text fragment associated to connection/profile information
Parameters:
| Name | Type | Description |
|---|---|---|
webSocketConnection |
Types.WSConnection | associated WS connection |
- Source:
Returns:
fragment denoting UUID of connected profile
- Type
- string
(inner) getGameInstanceFragment(gameInstance) → {string}
Constructs text fragment associated to game instance information
Parameters:
| Name | Type | Description |
|---|---|---|
gameInstance |
Types.GameInstance | associated game instance |
- Source:
Returns:
fragment denoting game code
- Type
- string
(inner) getSeverityFragment(severity) → {string}
Constructs text fragment associated to severity variant
Parameters:
| Name | Type | Description |
|---|---|---|
severity |
'log' | 'warn' | 'error' | severity of message |
- Source:
Returns:
styled severity fragment
- Type
- string
(inner) logOverview(gameInstancesByGameCode, gameInstancesByPlayerUUID)
Prints to the console an overview of current overall game information,
such as total active games and total active users
Parameters:
| Name | Type | Description |
|---|---|---|
gameInstancesByGameCode |
Record.<number, Types.GameInstance> | map of game codes/instances |
gameInstancesByPlayerUUID |
Record.<Types.UUID, Types.GameInstance> | map of game instances/player UUIDs |
- Source:
(inner) styleText(text, fontStyle) → {string}
Encapsulates text in ANSI codes for CLI styling
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | text to style |
fontStyle |
string | constant font style flag, e.g., RED_FONT |
- Source:
Returns:
styled text
- Type
- string