@fleupold/dex-contracts
Version:
Contracts for dFusion multi-token batch auction exchange
12 lines (11 loc) • 779 B
JavaScript
import { LoggerFactoryOptions, LFService, LogGroupRule, LogLevel, } from "typescript-logging";
// Create options instance and specify 2 LogGroupRules:
// * One for any logger with a name starting with model, to log on debug
// * The second one for anything else to log on info
const options = new LoggerFactoryOptions()
// .addLogGroupRule(new LogGroupRule(new RegExp("model.+"), LogLevel.Debug))
.addLogGroupRule(new LogGroupRule(new RegExp(".+"), LogLevel.Info))
.addLogGroupRule(new LogGroupRule(new RegExp(".+"), LogLevel.Warn));
// Create a named loggerfactory and pass in the options and export the factory.
// Named is since version 0.2.+ (it's recommended for future usage)
export const factory = LFService.createNamedLoggerFactory("LoggerFactory", options);