Skip to content

Commit 2b5245a

Browse files
committed
Merge pull request angular-ui#1472 from nmccready/dev/nmccready/nemSimpleLogger
uiGmapLogger to use angular-simple-logger
2 parents 44810c3 + 05af52c commit 2b5245a

File tree

129 files changed

+113
-4326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+113
-4326
lines changed

Gruntfile.coffee

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ module.exports = (grunt) ->
2525
'grunt-verbosity'
2626
'grunt-webpack'
2727
'grunt-angular-architecture-graph'
28-
].forEach (gruntLib) ->
29-
grunt.loadNpmTasks gruntLib
28+
].forEach (gruntLib) -> grunt.loadNpmTasks gruntLib
3029

3130
#squishing this file done by moving grunt options out to its own file. This way we can focus on tasks!
3231
options = require('./grunt/options')(grunt)

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
"main": "./dist/angular-google-maps.js",
55
"dependencies": {
66
"angular": "1.2 - 1.4",
7+
"angular-simple-logger": "~0.0.1",
78
"lodash": ">=3.8.0"
89
},
9-
"ignore":[
10+
"ignore": [
1011
"*.json",
1112
".gitignore",
1213
"travis.yml",

dist/angular-google-maps-street-view.js

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! angular-google-maps 2.1.6 2015-08-31
1+
/*! angular-google-maps 2.1.6 2015-09-03
22
* AngularJS directives for Google Maps
33
* git: https://github.com/angular-ui/angular-google-maps.git
44
*/
@@ -38,7 +38,7 @@ Nicholas McCready - https://twitter.com/nmccready
3838
*/
3939

4040
(function() {
41-
angular.module('uiGmapgoogle-maps.providers', []);
41+
angular.module('uiGmapgoogle-maps.providers', ['nemLogging']);
4242

4343
angular.module('uiGmapgoogle-maps.wrapped', []);
4444

@@ -163,65 +163,8 @@ return UUID;
163163
}).call(this);
164164
;(function() {
165165
angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapLogger', [
166-
'$log', function($log) {
167-
var LEVELS, Logger, log, maybeExecLevel;
168-
LEVELS = {
169-
log: 1,
170-
info: 2,
171-
debug: 3,
172-
warn: 4,
173-
error: 5,
174-
none: 6
175-
};
176-
maybeExecLevel = function(level, current, fn) {
177-
if (level >= current) {
178-
return fn();
179-
}
180-
};
181-
log = function(logLevelFnName, msg) {
182-
if ($log != null) {
183-
return $log[logLevelFnName](msg);
184-
} else {
185-
return console[logLevelFnName](msg);
186-
}
187-
};
188-
Logger = (function() {
189-
function Logger() {
190-
var logFns;
191-
this.doLog = true;
192-
logFns = {};
193-
['log', 'info', 'debug', 'warn', 'error'].forEach((function(_this) {
194-
return function(level) {
195-
return logFns[level] = function(msg) {
196-
if (_this.doLog) {
197-
return maybeExecLevel(LEVELS[level], _this.currentLevel, function() {
198-
return log(level, msg);
199-
});
200-
}
201-
};
202-
};
203-
})(this));
204-
this.LEVELS = LEVELS;
205-
this.currentLevel = LEVELS.error;
206-
this.log = logFns['log'];
207-
this.info = logFns['info'];
208-
this.debug = logFns['debug'];
209-
this.warn = logFns['warn'];
210-
this.error = logFns['error'];
211-
}
212-
213-
Logger.prototype.spawn = function() {
214-
return new Logger();
215-
};
216-
217-
Logger.prototype.setLog = function(someLogger) {
218-
return $log = someLogger;
219-
};
220-
221-
return Logger;
222-
223-
})();
224-
return new Logger();
166+
'nemSimpleLogger', function(nemSimpleLogger) {
167+
return nemSimpleLogger.spawn();
225168
}
226169
]);
227170

dist/angular-google-maps-street-view.min.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

dist/angular-google-maps-street-view_dev_mapped.js

Lines changed: 4 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-google-maps-street-view_dev_mapped.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)