Skip to content

Logger module

Dmitry Usik edited this page Mar 28, 2021 · 6 revisions

Intro

A logger module was created in order to log debug and error messages from a single place. It also makes the messages more readable and informative.

Usage

Follow the next steps:

  1. Create a logger.ts file in a module;
  2. Define LOG_CATEGORY, log and logError;
  3. Use log for debug messages and logError for error messages.

Example

Use a logger.ts file from the countries module as an example.

Clone this wiki locally