Methods
ConLog(text, typeopt) → {void}
This is the core logging function. TYPE OPTIONS: - Error: {1, `er`, `err`, `error`} - Success: {2, `ok`} - Warning: {3, `wa`, `war`, `warn`, `warning`} - Object: {4, `so`, `ob`, `obj`, `object`, `showobject`}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
text | * | You can log anything, not just text | |
type | number | | <optional> | - 1 | "error" | "er" | "err" - 2 | "ok" - 3 | "warning" | "wa" | "war" | "warn" - 4 | "showobject" | "so" | "ob" | "obj" | "object" |
Returns:
- Type:
- void
Example
ConLog({ userId: 123, status: `active`, permissions: [`read`, `write`] }, `object`)
ConLogInit(status) → {void}
Initialize ConLog with global enable/disable setting.
Parameters:
Name | Type | Description |
---|---|---|
status | boolean | Master switch for all console logging - true: Enable all ConLog output (default) - false: Completely disable all ConLog output |
- Source
Returns:
- Type:
- void
ConLogSet(options) → {void}
Configure which log types are displayed. All parameters default to true, so you only need to specify false values.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Configuration optionsProperties
|
- Source
Returns:
- Type:
- void
Example
ConLogSet({error: false, ok: false, warning: false, object: false, color: false})
ConLogStartMsg(status) → {void}
Display startup message showing current ConLog settings. Useful for debugging or confirming ConLog is properly initialized.
Parameters:
Name | Type | Description |
---|---|---|
status | boolean | Whether to display startup message (default: false) |
- Source
Returns:
- Type:
- void
ConLogSyntax(syntaxObject) → {object}
Function to highlight objects.
Parameters:
Name | Type | Description |
---|---|---|
syntaxObject | object | object for syntax highlighter |
- Source
Returns:
- Type:
- object