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

Error: You can assign a plugin only one time #42

Open
sb-cecilialiu opened this issue Mar 8, 2022 · 4 comments
Open

Error: You can assign a plugin only one time #42

sb-cecilialiu opened this issue Mar 8, 2022 · 4 comments

Comments

@sb-cecilialiu
Copy link

I needed to do login and logout logging, and I'm using the same custom logging:

export const customLog = (input, level, url) => {
if (input != null ) {
const customJSON = log => ({
msg: {input},
level: {level},
});
remoteLogin.apply(log, { format: customJSON, url: ${url} });
log.enableAll();
log.info(input);
}
};

but I got this error:

Error: You can assign a plugin only one time
at Object.apply (loglevel-plugin-remote.js:258:1)

Please help! Thanks so much!

@mahendra-virtueinfo
Copy link

Any update on the same?

@sb-cecilialiu
Copy link
Author

No I got the same error.

@sureshHARDIYA
Copy link

I got the same issue, any update on this one?

@sureshHARDIYA
Copy link

I was initiating remote.apply inside useEffect. I moved outside the Functional component and it fixed it.

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

3 participants