Skip to content

Commit

Permalink
fix level config for when used as drop-in
Browse files Browse the repository at this point in the history
  • Loading branch information
bbottema committed Jan 19, 2016
1 parent 9f6944c commit f21ef38
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-logger",
"version": "1.0.0",
"version": "1.0.4",
"repository": {
"type": "git",
"url": "https://github.com/better-js-logging/angular-logger.git"
Expand Down
1 change: 1 addition & 0 deletions dist/angular-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ var LoggingEnhancer = require('../bower_components/better-logging-base/dist/logg

config(['$provide', 'logEnhancerProvider', function ($provide, p) {
$provide.decorator('$log', ['$delegate', function ($delegate) {
$delegate.logLevels = p.logLevels; // copy the initial loglevel config
return {
// keep original methods, otherwise the enhanced functions on .getInstance() will have a double (global context) prefix
$$orig$log: angular.extend({}, $delegate),
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-logger.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-logger",
"version": "1.0.2",
"version": "1.0.4",
"description": "> Enhance $log for better logging, including patterns and level management",
"main": "angular-logger.min.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/angular-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ var LoggingEnhancer = require('../bower_components/better-logging-base/dist/logg

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

0 comments on commit f21ef38

Please sign in to comment.