LoggerManager is a singleton class used to contain logger information.

### Hierarchy

- LoggerManager

## Index

### Constructors

- constructor

### Properties

- console
- mIsLoggerInit
- mLogInMemory
- mMaxQueueSize
- mQueuedMessages
- DEFAULT_MAX_QUEUE_SIZE
- mInstance

### Accessors

- QueuedMessages
- isLoggerInit
- logInMemory
- maxQueueSize
- instance

### Methods

- dumpQueuedMessages
- queueMessage

## Constructors

### constructor

- new LoggerManager(): LoggerManager

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:36

  #### Returns LoggerManager

## Properties

### Private console

console: Console

- Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:35

### Private mIsLoggerInit

mIsLoggerInit: boolean = false

- Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:32

### Private mLogInMemory

mLogInMemory: boolean = false

- Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:33

### Private mMaxQueueSize

mMaxQueueSize: number

- Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:34

### Private mQueuedMessages

mQueuedMessages: IQueuedMessage[] = []

- Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:36

### Static Private Readonly DEFAULT_MAX_QUEUE_SIZE

DEFAULT_MAX_QUEUE_SIZE: 10000 = 10000

- Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:21

### Static Private mInstance

mInstance: LoggerManager = null

- Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:22

## Accessors

### QueuedMessages

- get QueuedMessages(): IQueuedMessage[]

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:82

  This function returned an array that contain all of the messages.

  #### Returns IQueuedMessage[]

### isLoggerInit

- get isLoggerInit(): boolean
- set isLoggerInit(status: boolean): void

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:47

  The following flag is used to monitor if the Logger.initLogger function have been called to set the configuration of log4js.

  #### Returns boolean

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:51

  The following flag is used to monitor if the Logger.initLogger function have been called to set the configuration of log4js.

  #### Parameters

  - ##### status: boolean

  #### Returns void

### logInMemory

- get logInMemory(): boolean
- set logInMemory(status: boolean): void

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:59

  The following flag is used to control if the log message should be store in memory while log4js have yet to be configured.

  #### Returns boolean

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:63

  The following flag is used to control if the log message should be store in memory while log4js have yet to be configured.

  #### Parameters

  - ##### status: boolean

  #### Returns void

### maxQueueSize

- get maxQueueSize(): number
- set maxQueueSize(size: number): void

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:71

  The following value is used to control the max number of messages allowed to be stored in memory at all time.

  #### Returns number

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:75

  The following value is used to control the max number of messages allowed to be stored in memory at all time.

  #### Parameters

  - ##### size: number

  #### Returns void

### Static instance

- get instance(): LoggerManager

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:24

  #### Returns LoggerManager

## Methods

### dumpQueuedMessages

- dumpQueuedMessages(file: string): void

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:116

  Dump all of the log messages in memory to the specified file

  #### Parameters

  - ##### file: string

    log file

  #### Returns void

### queueMessage

- queueMessage(category: string, method: string, message: string): void

- - Defined in @zowe/imperative/src/logger/src/LoggerManager.ts:96

  This function is responsible for gathering all of the input parameters and store them in the message queue array.

  New messages are to be stored at the top of the array instead of the bottom. This allow easy removing message from array while looping the array.

  #### Parameters

  - ##### category: string

    logger category

  - ##### method: string

    log method

  - ##### message: string

    log message

  #### Returns void

Generated using TypeDoc