Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Y.config.debug is true by default per YUI default settings #808

Merged
merged 1 commit into from
Nov 30, 2012

Conversation

caridy
Copy link
Contributor

@caridy caridy commented Nov 28, 2012

  • we should honor that.
  • Making sure that default log level is computed correctly based on the initial definition of logLevelOrder
  • moving that default definition to the configuration config.json

… honor that. Making sure that default log level is computed correctly based on the initial definition of logLevelOrder, and moving that default definition to the configuration config.json
MojitoServer.prototype._configureLogger = function(Y) {
var logLevel = (Y.config.logLevel || 'debug').toLowerCase(),
logLevelOrder = Y.config.logLevelOrder || [],
defaultLogLevel = logLevelOrder[0] || 'info';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't logLevelOrder[0] now always be debug, since we're always using config.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drewfish No, because Y.config.logLevelOrder comes from getAppConfig() from store in the first place, it is set as part of the Y.config early on, and it lands in the _configureLogger through Y.config.logLevelOrder. So, developers my want to redefine that list, in which case the lower priority element does not need to be 'debug' necessarily.

@drewfish
Copy link
Contributor

+1

caridy added a commit that referenced this pull request Nov 30, 2012
Y.config.debug is true by default per YUI default settings:
- we should honor that.
- Making sure that default log level is computed correctly based on the initial definition of logLevelOrder
- moving that default definition to the configuration config.json
@caridy caridy merged commit 468311b into YahooArchive:develop Nov 30, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants