Skip to content

Commit 05255af

Browse files
committed
feat: Allows defaultLog to be used externally.
1 parent 408258f commit 05255af

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ This package contains the [RepoFacade TypeScript interface](./src/RepoFacade.ts)
1717
import migrationsServiceFactory from '@js-migrations/core/dist/factory';
1818

1919
const migrationsServiceFacade = migrationsServiceFactory({
20-
log: console.log.bind(console),
2120
repo: migrationsRepoFacade,
2221
});
2322
```

src/utils/defaultLog.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ import Status from './statuses/Status';
77
import UnlockedCompletionStatus from './statuses/UnlockedCompletionStatus';
88
import UnlockedErrorStatus from './statuses/UnlockedErrorStatus';
99

10-
export default (status: Status) => {
11-
const log = (_message: string) => {
12-
return;
13-
};
10+
export default (status: Status, log = (_message: string) => { return; }) => {
1411
if (status instanceof LockedStatus) {
1512
log('Locked migrations');
1613
} else if (status instanceof MigrationEndStatus) {

0 commit comments

Comments
 (0)