Skip to content

Commit

Permalink
Do not error when logging long module names.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Mar 24, 2014
1 parent e2acb29 commit d461e7c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/ember-resolver-spade.js

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions dist/ember-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,18 @@ define("ember/resolver",

function logLookup(found, parsedName, moduleName) {
if (Ember.ENV.LOG_MODULE_RESOLVER) {
var symbol;
var symbol, padding;

if (found) { symbol = '[✓]'; }
else { symbol = '[ ]'; }

Ember.Logger.info(symbol, parsedName.fullName, new Array(40 - parsedName.fullName.length).join('.'), moduleName);
if (parsedName.fullName.length > 60) {
padding = '.';
} else {
padding = new Array(60 - parsedName.fullName.length).join('.');
}

Ember.Logger.info(symbol, parsedName.fullName, padding, moduleName);
}
}

Expand Down
2 changes: 1 addition & 1 deletion dist/ember-resolver.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions dist/ember-resolver.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,18 @@ define("ember/resolver",

function logLookup(found, parsedName, moduleName) {
if (Ember.ENV.LOG_MODULE_RESOLVER) {
var symbol;
var symbol, padding;

if (found) { symbol = '[✓]'; }
else { symbol = '[ ]'; }

Ember.Logger.info(symbol, parsedName.fullName, new Array(40 - parsedName.fullName.length).join('.'), moduleName);
if (parsedName.fullName.length > 60) {
padding = '.';
} else {
padding = new Array(60 - parsedName.fullName.length).join('.');
}

Ember.Logger.info(symbol, parsedName.fullName, padding, moduleName);
}
}

Expand Down
10 changes: 8 additions & 2 deletions dist/modules/ember-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,18 @@ define("ember/resolver",

function logLookup(found, parsedName, moduleName) {
if (Ember.ENV.LOG_MODULE_RESOLVER) {
var symbol;
var symbol, padding;

if (found) { symbol = '[✓]'; }
else { symbol = '[ ]'; }

Ember.Logger.info(symbol, parsedName.fullName, new Array(40 - parsedName.fullName.length).join('.'), moduleName);
if (parsedName.fullName.length > 60) {
padding = '.';
} else {
padding = new Array(60 - parsedName.fullName.length).join('.');
}

Ember.Logger.info(symbol, parsedName.fullName, padding, moduleName);
}
}

Expand Down
10 changes: 8 additions & 2 deletions packages/ember-resolver/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,18 @@ define("ember/resolver",

function logLookup(found, parsedName, moduleName) {
if (Ember.ENV.LOG_MODULE_RESOLVER) {
var symbol;
var symbol, padding;

if (found) { symbol = '[✓]'; }
else { symbol = '[ ]'; }

Ember.Logger.info(symbol, parsedName.fullName, new Array(40 - parsedName.fullName.length).join('.'), moduleName);
if (parsedName.fullName.length > 60) {
padding = '.';
} else {
padding = new Array(60 - parsedName.fullName.length).join('.');
}

Ember.Logger.info(symbol, parsedName.fullName, padding, moduleName);
}
}

Expand Down

0 comments on commit d461e7c

Please sign in to comment.