Open swashbuck opened 3 weeks ago
Reference line:
There are four extra pipes/function to the console api which can help filter the output:
console.debug
console.info
console.warn
console.error
Messages like those in this issue which are for debugging, should not be posted to console.log
but instead indirectly to console.debug
through logging.debug
.
Adapt has a logging system which should be used instead of direct console logs, this can be seen at the url below: https://github.com/adaptlearning/adapt-contrib-core/blob/9bc7db2480b8f7b3dfb9579637fc9f94cdd2d6fa/js/logging.js#L51-L86
Adapt's logging system is configured in the config.json
as can be seen in this schema:
https://github.com/adaptlearning/adapt-contrib-core/blob/9bc7db2480b8f7b3dfb9579637fc9f94cdd2d6fa/schema/config.schema.json#L348-L382
It is possible to set a default logging level in the config.json
such that only messages from the specified level upward are output to the console. The logging levels are listed in the logLevelEnum file.
Otherwise, here is an article on how to subsequently filter the console in a browser, such that the browser console only shows messages of the various types:
https://medium.com/@rhyneav/chromes-console-filters-and-how-to-use-them-63f2ff1c148b
It is probably wise not to remove logs used for debugging, but it is a good idea to output them to the correct pipe and to use the Adapt's APIs to do so.
Subject of the issue
In
end-trickle.js
, statements about when Trickle starts and ends are output to the console.This adds unnecessary messages to the console that are not valuable unless you are specifically troubleshooting a Trickle issue.
I would suggest one of the following:
console.debug()
_quietMode
or_suppressConsoleLogs
.