loglevel-plugin-remote
loglevel-plugin-remote copied to clipboard
Error: You can assign a plugin only one time
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!
Any update on the same?
No I got the same error.
I got the same issue, any update on this one?
I was initiating remote.apply inside useEffect. I moved outside the Functional component and it fixed it.