0.5.1 • Published 1 year ago
@sefranke/sf-simple-logger v0.5.1
��# A simple logger
Use a simple way to log with different loglevels.
The avaiable loglevels are:
- lvlNone
- lvlError
- lvlWarn
- lvlInfo
- lvlDebug
- lvlTrace
Usage is straightforward:
// Give the log levels you want to use as a param to the constructor
const log = new SFSimpleLogger(SFSimpleLogger.lvlError + SFSimpleLogger.lvlWarn + SFSimpleLogger.lvlInfo);
// Call the log with the used loglevel
log.log(SFSimpleLogger.lvlDebug, 'The is a debug message');
// Or call the special methods for each level directly.
log.logDebug('This is another debug message);
log.logInfo('Put some useful info in here!');