Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Some improvements to the core NX.* js bits #743

Merged
merged 23 commits into from
Feb 14, 2013
Merged

Conversation

jdillon
Copy link
Contributor

@jdillon jdillon commented Feb 10, 2013

Adds support for mixins.
Fixes issue with NX.define in a complex hierarchy.
Class and class prototype are now $className and $simpleClassName aware.
Objects get a slightly better toString()
Re-implemented NX.log, has better control over how levels are filtered.
Added LogAwareMixin which provides log{Debug|Warn|Info|Error} functions to objects to replace the $log usage.
LogAwareMixin has some runtime control over the format includeName, includeLevel, simpleName, etc.

Use NX.isobj to determine if we need to requireSuper.
Add $className to defined class types.
Throw meaningful exception in NX.obj() when object is not defined
Add NX.log.forceDebug to allow flipping on debug logging w/o the ?debug flag, which is causing me problems atm (and is really slow)
}

getLogger().debug("Subject '{}' is missing required permissions; rejecting", subject.getPrincipal());
return false;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eh, not JS related but snuck into the pull... I'll weed it out.

 Add to requiredClasses instead of requiredModules where possible.
Sanity check required classes exists.
Add LogAwareMixin class.
Add more detail to why strings.js exists.
….toString.

Use array syntax for NX.log.debug so we get better formatting of array data in the console (though better is in the eye of the beholder).
Minor updates to NX.log
Add more features to LogAwareMixin, can now show/hide the name show/hide level, and supports passing argument back to NX.log.*
Sanity check levels based on NX.log.levels configuration.
Require at least one user argument to log.
Use NX.assert
Clean up logging.
Moved $log support into LegacyLogMixin
@nabcos
Copy link
Contributor

nabcos commented Feb 13, 2013

+1

…eady defined icon /w <name> under new name (instead of making a new one).
jdillon added a commit that referenced this pull request Feb 14, 2013
Some improvements to the core NX.* js bits
@jdillon jdillon merged commit bb50450 into master Feb 14, 2013
@jdillon jdillon deleted the nx-js-improvements branch February 14, 2013 22:09
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