@leela-ai/log
v1.0.1
Published
Logger for Leela AI
Downloads
1
Readme
@leela-ai/log
Simple logger interface for Leela AI.
Can be extended to deliver logs to various destinations and to include additional information in the log messages.
Usage
import { ConsoleLog } from '@leela-ai/log';
const log = new ConsoleLog({ pretty: true }, 'MyTopic');
// (27/02/24, 07:51:24) [MyTopic] Hello, world!
log.info('Hello, world!');
const subLog = log.child('SubTopic');
// (27/02/24, 07:51:24) [MyTopic.SubTopic] Something went wrong!
subLog.error('Something went wrong!');
Extending
Look at the ConsoleLog
class for an example of how to extend the LogAdapter
class.