Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrokerOptions typescript definition does not contain logFormatter property #1249

Open
koldoon opened this issue Oct 5, 2023 · 1 comment

Comments

@koldoon
Copy link

koldoon commented Oct 5, 2023

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
@icebob
Copy link
Member

icebob commented Oct 8, 2023

the logFormatter is not a broker options, it's a Logger options as formatter. Maybe you see older version of Moleculer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants