# Class ConsoleServiceInstance

#### Hierarchy (view full)

- RWSService
  - ConsoleServiceInstance

- Defined in src/services/ConsoleService.ts:10

#####
Index

### Constructors

constructor

### Properties

_RELOADABLE
isEnabled
originalLogMethods?
_instances

### Methods

color
colorObject
disableOriginalLogFunctions
error
getOriginalLogFunctions
getPino
getReloadable
log
prettyPrintObject
reloadService
restoreOriginalLogFunctions
rwsLog
sanitizeObject
startLogging
stopLogging
updateLogLine
warn
getSingleton

## Constructors

### constructor

- new ConsoleServiceInstance(): ConsoleServiceInstance

- #### Returns ConsoleServiceInstance

  Overrides RWSService.constructor

  - Defined in src/services/ConsoleService.ts:14

## Properties

### _RELOADABLE

_RELOADABLE: boolean = false

Inherited from RWSService._RELOADABLE

- Defined in src/services/_service.ts:2

### `Private` isEnabled

isEnabled: boolean = true

- Defined in src/services/ConsoleService.ts:11

### `Private` `Optional` originalLogMethods

originalLogMethods?: any = null

- Defined in src/services/ConsoleService.ts:12

### `Static` `Protected` _instances

_instances: {
[key: string]: RWSService;
} = {}

#### Type declaration

- ##### [key: string]: RWSService

Inherited from RWSService._instances

- Defined in src/services/_service.ts:7

## Methods

### color

- color(): Chalk

- #### Returns Chalk

  - Defined in src/services/ConsoleService.ts:26

### colorObject

- colorObject(obj): string

- #### Parameters

  - ##### obj: any

  #### Returns string

  - Defined in src/services/ConsoleService.ts:73

### `Private` disableOriginalLogFunctions

- disableOriginalLogFunctions(): void

- #### Returns void

  - Defined in src/services/ConsoleService.ts:223

### error

- error(...obj): void

- #### Parameters

  - ##### `Rest` ...obj: any[]

  #### Returns void

  - Defined in src/services/ConsoleService.ts:173

### `Private` getOriginalLogFunctions

- getOriginalLogFunctions(): {
  error: {
  (...data): void;
  (message?, ...optionalParams): void;
  };
  log: {
  (...data): void;
  (message?, ...optionalParams): void;
  };
  warn: {
  (...data): void;
  (message?, ...optionalParams): void;
  };
  }

- #### Returns {
  error: {
  (...data): void;
  (message?, ...optionalParams): void;
  };
  log: {
  (...data): void;
  (message?, ...optionalParams): void;
  };
  warn: {
  (...data): void;
  (message?, ...optionalParams): void;
  };
  }

  - ##### error: {
    (...data): void;
    (message?, ...optionalParams): void;
    }

    - - (...data): void

      - MDN Reference

        #### Parameters

        - ##### `Rest` ...data: any[]

        #### Returns void

      - (message?, ...optionalParams): void

      - Prints to `stderr` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to `printf(3)` (the arguments are all passed to `util.format()`).

            const code = 5;
            console.error('error #%d', code);
            // Prints: error #5, to stderr
            console.error('error', code);
            // Prints: error 5, to stderr

        If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string values are concatenated. See `util.format()` for more information.

        #### Parameters

        - ##### `Optional` message: any

        - ##### `Rest` ...optionalParams: any[]

        #### Returns void

        #### Since

        v0.1.100

  - ##### log: {
    (...data): void;
    (message?, ...optionalParams): void;
    }

    - - (...data): void

      - MDN Reference

        #### Parameters

        - ##### `Rest` ...data: any[]

        #### Returns void

      - (message?, ...optionalParams): void

      - Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to `printf(3)` (the arguments are all passed to `util.format()`).

            const count = 5;
            console.log('count: %d', count);
            // Prints: count: 5, to stdout
            console.log('count:', count);
            // Prints: count: 5, to stdout

        See `util.format()` for more information.

        #### Parameters

        - ##### `Optional` message: any

        - ##### `Rest` ...optionalParams: any[]

        #### Returns void

        #### Since

        v0.1.100

  - ##### warn: {
    (...data): void;
    (message?, ...optionalParams): void;
    }

    - - (...data): void

      - MDN Reference

        #### Parameters

        - ##### `Rest` ...data: any[]

        #### Returns void

      - (message?, ...optionalParams): void

      - The `console.warn()` function is an alias for error.

        #### Parameters

        - ##### `Optional` message: any

        - ##### `Rest` ...optionalParams: any[]

        #### Returns void

        #### Since

        v0.1.100

  - Defined in src/services/ConsoleService.ts:215

### getPino

- getPino(): Logger

- #### Returns Logger

  - Defined in src/services/ConsoleService.ts:164

### getReloadable

- getReloadable(): string

- #### Returns string

  Inherited from RWSService.getReloadable

  - Defined in src/services/_service.ts:19

### log

- log(...obj): void

- #### Parameters

  - ##### `Rest` ...obj: any[]

  #### Returns void

  - Defined in src/services/ConsoleService.ts:30

### prettyPrintObject

- prettyPrintObject(obj): void

- #### Parameters

  - ##### obj: any

  #### Returns void

  - Defined in src/services/ConsoleService.ts:169

### reloadService

- reloadService<T>(this, ...params): InstanceType<T>

- #### Type Parameters

  - #### T extends (new (...args) => RWSService)

  #### Parameters

  - ##### this: T

  - ##### `Rest` ...params: any[]

  #### Returns InstanceType<T>

  Inherited from RWSService.reloadService

  - Defined in src/services/_service.ts:23

### `Private` restoreOriginalLogFunctions

- restoreOriginalLogFunctions(): void

- #### Returns void

  - Defined in src/services/ConsoleService.ts:229

### rwsLog

- rwsLog(...obj): void

- #### Parameters

  - ##### `Rest` ...obj: string[]

  #### Returns void

  - Defined in src/services/ConsoleService.ts:190

### sanitizeObject

- sanitizeObject(obj): any

- #### Parameters

  - ##### obj: any

  #### Returns any

  - Defined in src/services/ConsoleService.ts:150

### startLogging

- startLogging(): void

- #### Returns void

  - Defined in src/services/ConsoleService.ts:210

### stopLogging

- stopLogging(): void

- #### Returns void

  - Defined in src/services/ConsoleService.ts:205

### updateLogLine

- updateLogLine(message): void

- #### Parameters

  - ##### message: string

  #### Returns void

  - Defined in src/services/ConsoleService.ts:237

### warn

- warn(...obj): void

- #### Parameters

  - ##### `Rest` ...obj: any[]

  #### Returns void

  - Defined in src/services/ConsoleService.ts:133

### `Static` getSingleton

- getSingleton<T>(this): InstanceType<T>

- #### Type Parameters

  - #### T extends (new (...args) => RWSService)

  #### Parameters

  - ##### this: T

  #### Returns InstanceType<T>

  Inherited from RWSService.getSingleton

  - Defined in src/services/_service.ts:9

Generated using TypeDoc