Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Loggaby v4.0.0

Compare
Choose a tag to compare
@TorchedSammy TorchedSammy released this 08 Nov 21:15
· 7 commits to master since this release
  • 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's transmit 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