How to set log level of Cordova Console Plugin?

Does anyone know how to change the logLevel of the Cordova Plugin Console (https://github.com/apache/cordova-plugin-console) from “WARN” to “DEBUG”? It is set to “WARN” by default (https://github.com/apache/cordova-plugin-console/blob/master/www/logger.js#L80) and therefore levels such as “INFO” do not get logged to the console. I could of course overwrite the plugin’s JS code after ionic build and set the level to “DEBUG” but that can’t be the best way doing it. Any suggestions?

Not sure why you would want to do that. If the other log levels work, why not just not use info?

Well, right now one can only use LOG, ERROR and WARN as the log level is set to WARN.
INFO and DEBUG are below WARN and therefore can’t be used.

  • logger.LOG
  • logger.ERROR
  • logger.WARN
  • logger.INFO
  • logger.DEBUG

The more log levels you have available the more granular you can define your log messages.

Well, right now one can only use LOG, ERROR and WARN as the log level is set to WARN.
INFO and DEBUG are below WARN and therefore can’t be used.

  • logger.LOG
  • logger.ERROR
  • logger.WARN
  • logger.INFO
  • logger.DEBUG

The more log levels you have available the more granular you can define your log messages.

True, but most of your development does happen in the browser, where the plugin wouldn’t work. But if you need it to work once its on a device, then yes, you would need to edit the plugin.