angular/angular.js — pull request #3866 by sparty02 (2013-09-04 03:15:17+00:00)
Title: Hierarchical log level support

Enhances the existing "debugEnabled" support in $log by providing the ability to configure a log level via $logProvider. The log level works on a hierarchy system where the priority is:
'off', 'error', 'warn', 'info', 'log', 'debug', 'all'

For example, when setting the log level to 'info', error, warn, and info messages are logged to the console (following the existing logic for checking if the console exists/etc). For backwards compatibility, the existing debugEnabled logic was left in (marked deprecated) and simply delegated to the appropriate log level.

Test cases can be found in test/ng/logSpec.js including (again, legacy debug test cases were left in).