WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit f21ef38

Browse files
committed
fix level config for when used as drop-in
1 parent 9f6944c commit f21ef38

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-logger",
3-
"version": "1.0.0",
3+
"version": "1.0.4",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/better-js-logging/angular-logger.git"

dist/angular-logger.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ var LoggingEnhancer = require('../bower_components/better-logging-base/dist/logg
6161

6262
config(['$provide', 'logEnhancerProvider', function ($provide, p) {
6363
$provide.decorator('$log', ['$delegate', function ($delegate) {
64+
$delegate.logLevels = p.logLevels; // copy the initial loglevel config
6465
return {
6566
// keep original methods, otherwise the enhanced functions on .getInstance() will have a double (global context) prefix
6667
$$orig$log: angular.extend({}, $delegate),

dist/angular-logger.min.js

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-logger",
3-
"version": "1.0.2",
3+
"version": "1.0.4",
44
"description": "> Enhance $log for better logging, including patterns and level management",
55
"main": "angular-logger.min.js",
66
"scripts": {

src/angular-logger.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ var LoggingEnhancer = require('../bower_components/better-logging-base/dist/logg
6060

6161
config(['$provide', 'logEnhancerProvider', function ($provide, p) {
6262
$provide.decorator('$log', ['$delegate', function ($delegate) {
63+
$delegate.logLevels = p.logLevels; // copy the initial loglevel config
6364
return {
6465
// keep original methods, otherwise the enhanced functions on .getInstance() will have a double (global context) prefix
6566
$$orig$log: angular.extend({}, $delegate),

0 commit comments

Comments
 (0)