diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-08-26 14:03:02 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-09-03 19:31:00 +0200 |
| commit | 952b03e32dc8ef6bae383debec8d78e40e22599f (patch) | |
| tree | 0ed8040f35d5684e3c08015b4cc7238935d9ca05 /addons/web/static/src | |
| parent | 207f863d33e20c9c631655a6b869228e033687b9 (diff) | |
[IMP] web: boot.js display the log only on error or with the debug mode
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/boot.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/web/static/src/js/boot.js b/addons/web/static/src/js/boot.js index cb4f45f3fdb..80adf9874ca 100644 --- a/addons/web/static/src/js/boot.js +++ b/addons/web/static/src/js/boot.js @@ -189,8 +189,11 @@ if (!_.isEmpty(rejected)) log.push('\nRejected modules: ', rejected); if (!_.isEmpty(rejected_linked))log.push('\nRejected linked modules:', rejected_linked); if (!_.isEmpty(unloaded)) log.push('\nNon loaded modules: ', _.pluck(unloaded, 'name')); - if (!_.isEmpty(debug_jobs)) log.push('\nDebug: ', JSON.stringify(debug_jobs)); - console[_.isEmpty(unloaded) ? 'info' : 'error'].apply(console, log); + if (odoo.debug && !_.isEmpty(debug_jobs)) log.push('\nDebug: ', debug_jobs); + + if (odoo.debug || !_.isEmpty(failed) || !_.isEmpty(unloaded)) { + console[_.isEmpty(unloaded) ? 'info' : 'error'].apply(console, log); + } } }, process_jobs: function (jobs, services) { |
