db-migrate / db-migrate/node-db-migrate

Migration templates should use shared log

Open
#422 1 comment 0 reactions 0 assignees View on GitHub
Refactoring
Dominant language
JavaScript
Stars
2.3k
Forks
361
PR merge metrics
No merged PRs in 30d

Description

Migration templates currently use `console.log` in several places. It would be better to use the `db-migrate-shared` `log` functions, so that logging output can be controlled easily through global variables. In my case, I programmatically use `db-migrate` and prefer not to override the `console` functions.

Here is where `console.log` appears in the migration templates:

https://github.com/db-migrate/node-db-migrate/blob/688b89f0bd5d3729b28abf05c1002a089e13efd9/lib/migration.js#L159

https://github.com/db-migrate/node-db-migrate/blob/688b89f0bd5d3729b28abf05c1002a089e13efd9/lib/migration.js#L175

https://github.com/db-migrate/node-db-migrate/blob/688b89f0bd5d3729b28abf05c1002a089e13efd9/lib/migration.js#L223

https://github.com/db-migrate/node-db-migrate/blob/688b89f0bd5d3729b28abf05c1002a089e13efd9/lib/migration.js#L244
##

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38131976-migration-templates-should-use-shared-log?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.