EventHopper / EHServerSide

Server-Side functionality including REST API, hosting scripts & client-server modules
0 stars 0 forks source link

Integrated npm Debug for logging #128

Closed kylermintah closed 4 years ago

kylermintah commented 4 years ago

Resolves #127

Changes made

Debug must be imported per file it is used in.

See the following example:

File: /debug.example.ts

import Debug from 'debug';
const debug = Debug('debug.example');

//... Some Code ...//

const name = 'blueberry';
debug(name);

It is important to initialize Debug with the name of the file it is in (exclude file extension)

The name you use to initialize the Debug instance will show in the console output.

image