This repository has been archived by the owner on Apr 13, 2024. It is now read-only.
Loggaby v4.0.0
- JSDoc for Loggaby class and Transports
- Make Loggaby partly a Singleton (the first declared instance can be retrieved with
Loggaby.getInstance()
) - (Breaking Change) BaseTransport requires an object to be passed as options instead of a single
useColor
arg:
class CustomTransport extends Loggaby.Transport {
constructor() {
// This:
// super(false)
// Now has to be:
super({color: false}); // Disable color
}
}
// So this also changes..
const TerminalTransport = new Loggaby.TerminalTransport({color: false});
- (Breaking Change) Debug log hiding is handed transport-side now. This allows debug-only transports, but for old transport this change is problematic if you didn't want debug logs.
- An extra
opts
argument is now passed to a transport'stransmit
function. It tells if debug on the logger is on/off/auto and info about the level. - Customizable log format
- Fix error if color is disabled
debug: 'auto'
will automatically handle (dis/en)abling debug logs