### Hierarchy

- Console

### Implements

- IConsole

## Index

### Constructors

- constructor

### Properties

- mColor
- mIsOn
- mLevel
- mPrefix
- LEVELS
- LEVEL_DEFAULT

### Accessors

- color
- level
- on
- prefix

### Methods

- addContext
- clearContext
- debug
- error
- fatal
- format
- info
- isDebugEnabled
- isErrorEnabled
- isFatalEnabled
- isFormatEnabled
- isInfoEnabled
- isLevelEnabled
- isTraceEnabled
- isWarnEnabled
- log
- removeContext
- trace
- warn
- writeStderr
- writeStdout
- buildPrefix
- getConsole
- isValidLevel
- validateLevel

## Constructors

### constructor

- new Console(mLevel?: string): Console

- - Defined in @zowe/imperative/src/console/src/Console.ts:49

  #### Parameters

  - ##### Default value mLevel: string = Console.LEVEL_DEFAULT

  #### Returns Console

## Properties

### Private mColor

mColor: boolean

- Defined in @zowe/imperative/src/console/src/Console.ts:48

### Private mIsOn

mIsOn: boolean

- Defined in @zowe/imperative/src/console/src/Console.ts:49

### Private mLevel

mLevel: string

- Defined in @zowe/imperative/src/console/src/Console.ts:51

### Private mPrefix

mPrefix: boolean

- Defined in @zowe/imperative/src/console/src/Console.ts:47

### Static Readonly LEVELS

LEVELS: string[] = ["trace", "debug", "info", "warn", "error", "fatal", "off"]

- Defined in @zowe/imperative/src/console/src/Console.ts:26

### Static Readonly LEVEL_DEFAULT

LEVEL_DEFAULT: "warn" = "warn"

- Defined in @zowe/imperative/src/console/src/Console.ts:27

## Accessors

### color

- get color(): boolean
- set color(isEnabled: boolean): void

- - Defined in @zowe/imperative/src/console/src/Console.ts:258

  #### Returns boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:254

  #### Parameters

  - ##### isEnabled: boolean

  #### Returns void

### level

- get level(): string
- set level(level: string): void

- - Defined in @zowe/imperative/src/console/src/Console.ts:242

  #### Returns string

- - Defined in @zowe/imperative/src/console/src/Console.ts:236

  #### Parameters

  - ##### level: string

  #### Returns void

### on

- get on(): boolean
- set on(isOn: boolean): void

- - Defined in @zowe/imperative/src/console/src/Console.ts:266

  #### Returns boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:262

  #### Parameters

  - ##### isOn: boolean

  #### Returns void

### prefix

- get prefix(): boolean
- set prefix(isEnabled: boolean): void

- - Defined in @zowe/imperative/src/console/src/Console.ts:250

  #### Returns boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:246

  #### Parameters

  - ##### isEnabled: boolean

  #### Returns void

## Methods

### addContext

- addContext(_key: string, _value: any): void

- - Defined in @zowe/imperative/src/console/src/Console.ts:59

  #### Parameters

  - ##### _key: string

  - ##### _value: any

  #### Returns void

### clearContext

- clearContext(): void

- - Defined in @zowe/imperative/src/console/src/Console.ts:67

  #### Returns void

### debug

- debug(message: any, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:131

  #### Parameters

  - ##### message: any

  - ##### Rest ...args: any[]

  #### Returns string

### error

- error(message: any, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:159

  #### Parameters

  - ##### message: any

  - ##### Rest ...args: any[]

  #### Returns string

### fatal

- fatal(message: any, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:173

  #### Parameters

  - ##### message: any

  - ##### Rest ...args: any[]

  #### Returns string

### Private format

- format(data: string, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:207

  #### Parameters

  - ##### data: string

  - ##### Rest ...args: any[]

  #### Returns string

### info

- info(message: any, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:103

  #### Parameters

  - ##### message: any

  - ##### Rest ...args: any[]

  #### Returns string

### isDebugEnabled

- isDebugEnabled(): boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:79

  #### Returns boolean

### isErrorEnabled

- isErrorEnabled(): boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:91

  #### Returns boolean

### isFatalEnabled

- isFatalEnabled(): boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:95

  #### Returns boolean

### isFormatEnabled

- isFormatEnabled(): boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:99

  #### Returns boolean

### isInfoEnabled

- isInfoEnabled(): boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:83

  #### Returns boolean

### isLevelEnabled

- isLevelEnabled(): boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:71

  #### Returns boolean

### isTraceEnabled

- isTraceEnabled(): boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:75

  #### Returns boolean

### isWarnEnabled

- isWarnEnabled(): boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:87

  #### Returns boolean

### log

- log(level: Exclude<ConsoleLevels, "off">, message: any, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:187

  #### Parameters

  - ##### level: Exclude<ConsoleLevels, "off">

  - ##### message: any

  - ##### Rest ...args: any[]

  #### Returns string

### removeContext

- removeContext(_key: string): void

- - Defined in @zowe/imperative/src/console/src/Console.ts:63

  #### Parameters

  - ##### _key: string

  #### Returns void

### trace

- trace(message: any, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:117

  #### Parameters

  - ##### message: any

  - ##### Rest ...args: any[]

  #### Returns string

### warn

- warn(message: any, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:145

  #### Parameters

  - ##### message: any

  - ##### Rest ...args: any[]

  #### Returns string

### Private writeStderr

- writeStderr(message: string, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:191

  #### Parameters

  - ##### message: string

  - ##### Rest ...args: any[]

  #### Returns string

### Private writeStdout

- writeStdout(message: string, ...args: any[]): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:199

  #### Parameters

  - ##### message: string

  - ##### Rest ...args: any[]

  #### Returns string

### Static buildPrefix

- buildPrefix(type: string): string

- - Defined in @zowe/imperative/src/console/src/Console.ts:228

  #### Parameters

  - ##### type: string

  #### Returns string

### Static getConsole

- getConsole(_category: string): Console

- - Defined in @zowe/imperative/src/console/src/Console.ts:29

  #### Parameters

  - ##### _category: string

  #### Returns Console

### Static isValidLevel

- isValidLevel(level: string): boolean

- - Defined in @zowe/imperative/src/console/src/Console.ts:33

  #### Parameters

  - ##### level: string

  #### Returns boolean

### Static validateLevel

- validateLevel(level: string): void

- - Defined in @zowe/imperative/src/console/src/Console.ts:37

  #### Parameters

  - ##### level: string

  #### Returns void

Generated using TypeDoc