I am using loglevel, loglevel-plugin-prefix and loglevel-plugin-remote to send frontend logs to the backend in a React App. I want to be able to send the logs to the backend in prod without printing them on the console. Is there a way to do that?
Here's what the code looks like:
import * as log from "loglevel";
import prefix from "loglevel-plugin-prefix";
import remote from "loglevel-plugin-remote";
remote.apply(log);
prefix.reg(log);
prefix.apply(log);
log.enableAll();
I've tried adding console.log = () => {};
but that has no effect.