0.0.5 • Published 2 years ago

@mbass/js-debug-logger v0.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

js-debug-logger

A console logger for Javascript (with TypeScript type definitions) that adds useful debug information to the logs, e.g. timestamp, name of the function performing the log, full stack trace, etc...

Dependencies

None

Usage

// Import the necessary types
import { logDebugInfo, LogLevel } from '@mbass/js-debug-logger';

...
...

// Call the logging function (NB: only the first argument is mandatory)
logDebugInfo('A log at debug level, with its timestamp and its stacktrace', LogLevel.Debug, true, true);

Output produced in browser console:

[09:30:54.462|DebugInfo|inside SomeClass.doSomething()]: A log at debug level, with its timestamp and its stacktrace
Trace: The current stacktrace is:
    at logDebugInfo (...\lib\index.js:30:17)    
    at SomeClass.doSomething (...\consumer.js:18:24)
0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago