# Class Logger

日志管理

### Example

    oops.log.trace("默认标准日志");
    oops.log.logConfig("灰色配置日志");
    oops.log.logNet("橙色网络日志");
    oops.log.logModel("紫色数据日志");
    oops.log.logBusiness("蓝色业务日志");
    oops.log.logView("绿色视图日志");

#### Hierarchy

- Logger

- Defined in assets/core/common/log/Logger.ts:38

#####
Index

### Constructors

constructor

### Properties

tags

### Methods

blue
end
getDateString
gray
green
init
isOpen
logBusiness
logConfig
logModel
logNet
logView
orange
print
setTags
stack
start
table
trace
violet

## Constructors

### constructor

- new Logger(): Logger

- #### Returns Logger

## Properties

### `Static` `Private` tags

tags: number = 0

- Defined in assets/core/common/log/Logger.ts:39

## Methods

### `Static` `Private` blue

- blue(tag: LogType, msg: any, describe?: string): void

- #### Parameters

  - ##### tag: LogType

  - ##### msg: any

  - ##### `Optional` describe: string

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:171

### `Static` end

- end(describe?: string): void

- 打印范围内时间消耗

  ### Example

      oops.log.start();
      ...
      省略N行代码
      ...
      oops.log.end();

  #### Parameters

  - ##### describe: string = "Time"

    标题描述

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:86

### `Static` `Private` getDateString

- getDateString(): string

- #### Returns string

  - Defined in assets/core/common/log/Logger.ts:261

### `Static` `Private` gray

- gray(tag: LogType, msg: any, describe?: string): void

- #### Parameters

  - ##### tag: LogType

  - ##### msg: any

  - ##### `Optional` describe: string

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:181

### `Static` `Private` green

- green(tag: LogType, msg: any, describe?: string): void

- #### Parameters

  - ##### tag: LogType

  - ##### msg: any

  - ##### `Optional` describe: string

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:176

### `Static` `Private` init

- init(): void

- #### Returns void

  - Defined in assets/core/common/log/Logger.ts:41

### `Static` `Private` isOpen

- isOpen(tag: LogType ): boolean

- #### Parameters

  - ##### tag: LogType

  #### Returns boolean

  - Defined in assets/core/common/log/Logger.ts:185

### `Static` logBusiness

- logBusiness(msg: any, describe?: string): void

- 打印业务层日志

  #### Parameters

  - ##### msg: any

    日志消息

  - ##### `Optional` describe: string

    标题描述

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:142

### `Static` logConfig

- logConfig(msg: any, describe?: string): void

- 打印配置日志

  #### Parameters

  - ##### msg: any

  - ##### `Optional` describe: string

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:156

### `Static` logModel

- logModel(msg: any, describe?: string): void

- 打印数据层日志

  #### Parameters

  - ##### msg: any

    日志消息

  - ##### `Optional` describe: string

    标题描述

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:133

### `Static` logNet

- logNet(msg: any, describe?: string): void

- 打印网络层日志

  #### Parameters

  - ##### msg: any

    日志消息

  - ##### `Optional` describe: string

    标题描述

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:124

### `Static` logView

- logView(msg: any, describe?: string): void

- 打印视图日志

  #### Parameters

  - ##### msg: any

    日志消息

  - ##### `Optional` describe: string

    标题描述

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:151

### `Static` `Private` orange

- orange(tag: LogType, msg: any, describe?: string): void

- #### Parameters

  - ##### tag: LogType

  - ##### msg: any

  - ##### `Optional` describe: string

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:161

### `Static` `Private` print

- print(tag: LogType, msg: any, color: string, describe?: string): void

- 输出日志

  #### Parameters

  - ##### tag: LogType

    日志类型

  - ##### msg: any

    日志内容

  - ##### color: string

    日志文本颜色

  - ##### `Optional` describe: string

    日志标题描述

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:196

### `Static` setTags

- setTags(tag?: LogType ): void

- 设置显示的日志类型，默认值为不显示任何类型日志

  ### Example

      oops.log.setTags(LogType.View|LogType.Business)

  #### Parameters

  - ##### tag: LogType = ...

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:56

### `Static` `Private` stack

- stack(index: number): string

- #### Parameters

  - ##### index: number

  #### Returns string

  - Defined in assets/core/common/log/Logger.ts:212

### `Static` start

- start(describe?: string): void

- 记录开始计时

  ### Example

      oops.log.start();
      ...
      省略N行代码
      ...
      oops.log.end();

  #### Parameters

  - ##### describe: string = "Time"

    标题描述

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:72

### `Static` table

- table(msg: any, describe?: string): void

- 打印表格

  ### Example

      var object:any = {uid:1000, name:"oops"};
      oops.log.table(object);

  #### Parameters

  - ##### msg: any

    日志消息

  - ##### `Optional` describe: string

    标题描述

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:98

### `Static` trace

- trace(msg: any, color?: string): void

- 打印标准日志

  #### Parameters

  - ##### msg: any

    日志消息

  - ##### color: string = "color:#ffffff;"

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:109

### `Static` `Private` violet

- violet(tag: LogType, msg: any, describe?: string): void

- #### Parameters

  - ##### tag: LogType

  - ##### msg: any

  - ##### `Optional` describe: string

  #### Returns void

  - Defined in assets/core/common/log/Logger.ts:166

Generated using TypeDoc