Closed samuliasmala closed 2 years ago
Hi @samuliasmala thanks for the issue and the offer! My preference would be to update the docs rather than the default so that it's non breaking. Re 2) - I wouldn't want that to be a separate configuration parameter, but maybe the library could export a prettyLogger
object which users could set as the value for logger
if they want to.
Thanks for the quick reply. Makes sense to update docs, I'll create a pull requests for both 1 & 2.
According to Slonik migrator documentation the logger default value is
console
, but the default parameter is actuallyundefined
. I.e.,new SlonikMigrator();
gives no output, whereasnew SlonikMigrator({ logger: console });
gives proper JSON-formatted output.Two questions:
prettyLogger: boolean
which would convert JSON-logs to strings? Since themigrate.js
is used from CLI that would often be useful.I'd be happy to provide pull requests for both of the above