Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Unified Diff: chrome/browser/resources/file_manager/js/metadata/metadata_cache.js

Issue 10827410: Avoid log spam in Files app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/metadata/metadata_cache.js
diff --git a/chrome/browser/resources/file_manager/js/metadata/metadata_cache.js b/chrome/browser/resources/file_manager/js/metadata/metadata_cache.js
index d8605d1f29c52c027691988b7bf158c8f79376be..d8b0381e08a5b33d572c821e48382c5c210f3c33 100644
--- a/chrome/browser/resources/file_manager/js/metadata/metadata_cache.js
+++ b/chrome/browser/resources/file_manager/js/metadata/metadata_cache.js
@@ -843,7 +843,7 @@ ContentProvider.prototype.onMessage_ = function(event) {
'on' + data.verb.substr(0, 1).toUpperCase() + data.verb.substr(1) + '_';
if (!(methodName in this)) {
- console.log('Unknown message from metadata reader: ' + data.verb, data);
+ console.error('Unknown message from metadata reader: ' + data.verb, data);
return;
}
@@ -928,7 +928,8 @@ ContentProvider.prototype.onResult_ = function(url, metadata) {
* @private
*/
ContentProvider.prototype.onError_ = function(url, step, error, metadata) {
- console.warn('metadata: ' + url + ': ' + step + ': ' + error);
+ if (localStorage.logMetadata) // Avoid log spam by default.
+ console.warn('metadata: ' + url + ': ' + step + ': ' + error);
metadata = metadata || {};
// Prevent asking for thumbnail again.
metadata.thumbnailURL = '';
@@ -941,5 +942,6 @@ ContentProvider.prototype.onError_ = function(url, step, error, metadata) {
* @private
*/
ContentProvider.prototype.onLog_ = function(arglist) {
- console.log.apply(console, ['metadata:'].concat(arglist));
+ if (localStorage.logMetadata) // Avoid log spam by default.
+ console.log.apply(console, ['metadata:'].concat(arglist));
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698