AWS Amplify API
AWS Amplify Home
Options
All

- Public
- Public/Protected
- All

Inherited Externals Only exported
Menu

Write logs

class

  Logger

### Hierarchy

- ConsoleLogger

### Implements

- Logger

## Index

### Constructors

- constructor

### Properties

- level
- name
- LOG_LEVEL

### Methods

- _log
- _padding
- _ts
- debug
- error
- info
- log
- verbose
- warn

## Constructors

### constructor

- new ConsoleLogger(name: any, level?: string): ConsoleLogger

- - Defined in core/src/Logger/ConsoleLogger.ts:30
  constructor

  #### Parameters

  - ##### name: any

    Name of the logger

  - ##### Default value level: string = "WARN"

  #### Returns ConsoleLogger

## Properties

### level

level: string

- Defined in core/src/Logger/ConsoleLogger.ts:30

### name

name: string

- Defined in core/src/Logger/ConsoleLogger.ts:29

### Static LOG_LEVEL

LOG_LEVEL: any = null

- Defined in core/src/Logger/ConsoleLogger.ts:41

## Methods

### _log

- _log(type: string, ...msg: any[]): void

- - Defined in core/src/Logger/ConsoleLogger.ts:62

  Write log

  method
  memeberof

    Logger

  #### Parameters

  - ##### type: string

    log type, default INFO

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

    Logging message or object

  #### Returns void

### _padding

- _padding(n: any): string

- - Defined in core/src/Logger/ConsoleLogger.ts:43

  #### Parameters

  - ##### n: any

  #### Returns string

### _ts

- _ts(): string

- - Defined in core/src/Logger/ConsoleLogger.ts:47

  #### Returns string

### debug

- debug(...msg: any[]): void

- - Defined in core/src/Logger/ConsoleLogger.ts:132

  Write DEBUG log

  method
  memeberof

    Logger

  #### Parameters

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

    Logging message or object

  #### Returns void

### error

- error(...msg: any[]): void

- - Defined in core/src/Logger/ConsoleLogger.ts:124

  Write ERROR log

  method
  memeberof

    Logger

  #### Parameters

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

    Logging message or object

  #### Returns void

### info

- info(...msg: any[]): void

- - Defined in core/src/Logger/ConsoleLogger.ts:108

  Write INFO log

  method
  memeberof

    Logger

  #### Parameters

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

    Logging message or object

  #### Returns void

### log

- log(...msg: any[]): void

- - Defined in core/src/Logger/ConsoleLogger.ts:100

  Write General log. Default to INFO

  method
  memeberof

    Logger

  #### Parameters

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

    Logging message or object

  #### Returns void

### verbose

- verbose(...msg: any[]): void

- - Defined in core/src/Logger/ConsoleLogger.ts:140

  Write VERBOSE log

  method
  memeberof

    Logger

  #### Parameters

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

    Logging message or object

  #### Returns void

### warn

- warn(...msg: any[]): void

- - Defined in core/src/Logger/ConsoleLogger.ts:116

  Write WARN log

  method
  memeberof

    Logger

  #### Parameters

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

    Logging message or object

  #### Returns void