loglevel-plugin-remote icon indicating copy to clipboard operation
loglevel-plugin-remote copied to clipboard

Error: You can assign a plugin only one time

Open sb-cecilialiu opened this issue 3 years ago • 4 comments

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!

sb-cecilialiu avatar Mar 08 '22 15:03 sb-cecilialiu

Any update on the same?

mahendra-virtueinfo avatar Mar 31 '22 10:03 mahendra-virtueinfo

No I got the same error.

sb-cecilialiu avatar Mar 31 '22 14:03 sb-cecilialiu

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

sureshHARDIYA avatar Sep 05 '22 08:09 sureshHARDIYA

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

sureshHARDIYA avatar Sep 05 '22 08:09 sureshHARDIYA