moleculer
moleculer copied to clipboard
BrokerOptions typescript definition does not contain logFormatter property
In typescript project I can't setup logFormatter. According to documentation:
const broker = new ServiceBroker({
logFormatter(level, args, bindings) {
return level.toUpperCase() + " " + bindings.nodeID + ": " + args.join(" ");
}
});
Typescript says:
TS2345: Argument of type
{ logFormatter(level: any, args: any, bindings: any): string; }
is not assignable to parameter of type BrokerOptions
Object literal may only specify known properties, and logFormatter does not exist in type BrokerOptions
the logFormatter
is not a broker options, it's a Logger options as formatter
. Maybe you see older version of Moleculer.