Skip to content

Commit

Permalink
feat(state): sets logger level on state merging
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 22, 2019
1 parent c146b7b commit 7e7e190
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/state/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { get } from 'slimconf';
import mergewith from 'lodash.mergewith';
import { IOptions, IOfType } from '~/types';
import { DEFAULT_LOG_LEVEL } from '~/constants';
import { setLevel } from '~/utils/logger';
import hash from 'object-hash';

export const states = {
Expand Down Expand Up @@ -48,4 +49,5 @@ function merge(): void {
state = Object.assign({}, states.base, states.scope, {
env: Object.assign({}, states.base.env, states.scope.env)
});
if (state.log) setLevel(state.log);
}

0 comments on commit 7e7e190

Please sign in to comment.