Skip to content

Commit

Permalink
fix: export logger & allow define logger by custom injectableOptions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
noahziheng authored May 26, 2022
1 parent 06c7509 commit 21b42b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export {
ArtusInjectEnum
} from './constraints';
export * from './loader';
export * from './logger';
export * from './lifecycle';
export * from './exception';
export * from './plugin';
Expand Down
7 changes: 4 additions & 3 deletions src/logger/decorator.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Injectable, ScopeEnum } from '@artus/injection';
import { Injectable, InjectableOption, ScopeEnum } from '@artus/injection';
import { ArtusInjectEnum } from '../constraints';

export const DefineLogger = (): ClassDecorator => {
export const DefineLogger = (injectableOpts: InjectableOption = {}): ClassDecorator => {
return Injectable({
id: ArtusInjectEnum.Logger,
scope: ScopeEnum.SINGLETON
scope: ScopeEnum.SINGLETON,
...injectableOpts
});
};

0 comments on commit 21b42b5

Please sign in to comment.