yui/yui3 — pull request #1678 by andrewnicols (2014-03-04 09:29:05+00:00)
Title: Differential loglevel

This commit adds differential logging support such that different log
sources can have independent logLevels specified. This allows warnings to
be shown from noisy modules, whilst getting debugging from the item you are
actively developing.

I've also taken the liberty of splitting out the log tests from the rest of the tests after I got fed up of waiting for other tests to run.

I've also, also tidied up the console overrides to reduce code duplication, and to make sure that we actually reset the console afterwards.

Here's a sample YUI_config to demonstrate how this can work:
```
YUI_config = {
// The default logLevel will be warn:
logLevel: 'warn',
logInclude: {
// Reduce the logging threshold to debug for event-delegate:
'event-delegate': 'debug',

// Reduce the logging threshold to info for event-logged-at-info:
'event-logged-at-info': 'info',

// Reduce the logging threshold to Y.config.logLevel for event-logged-at-true:
'event-logged-at-true': true,

// Do not log anything for 'event-not-logged':
'event-not-logged': false,

// Do not log anything for everything else:
'*': false
}
};
```

Technically speaking, the ```*``` key on logExclude is not required, but I have included it for completeness.

As a note, this *could* be easily extended to support regular expressions, but I feel that this would probably be adding too much of an overhead at this stage