Closed ngxson closed 6 months ago
Resolves #40 #17
When initializing Wllama, you wan pass a custom logger to Wllama.
Example 1: Suppress debug message
import { Wllama, LoggerWithoutDebug } from '@wllama/wllama'; const wllama = new Wllama(pathConfig, { // LoggerWithoutDebug is predefined inside wllama logger: LoggerWithoutDebug, });
Example 2: Add emoji prefix to log messages
const wllama = new Wllama(pathConfig, { logger: { debug: (...args) => console.debug('🔧', ...args), log: (...args) => console.log('ℹ️', ...args), warn: (...args) => console.warn('⚠️', ...args), error: (...args) => console.error('☠️', ...args), }, });
rockin' it
Resolves #40 #17
When initializing Wllama, you wan pass a custom logger to Wllama.
Example 1: Suppress debug message
Example 2: Add emoji prefix to log messages