You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see only 2 things that should be logged from user's point of view:
Migration progress (what version is currently being applied)
Errors
Latter can be logged by user (e.g. journey CLI), as errors are returned immediately.
Adding logging interface only to log migration progress seems like overkill.
In #3 I implemented ability to add pre/post migration hooks. Hook has following signature:
func(f file.File) error
So you can add "pre" hook like this:
funclogMigrationHook(f file.File) error {
examplelogger.Infof("Applying version %d", f.Version)
returnnil
}
(see PR for details on hooks api)
That pretty much solves the issue without extra bloating.
Except, maybe, debugging. Debug log is not something user would like to face, so we can simply bake any logger in, and make option to enable it.
Your thoughts ?
The text was updated successfully, but these errors were encountered:
I see only 2 things that should be logged from user's point of view:
Latter can be logged by user (e.g. journey CLI), as errors are returned immediately.
Adding logging interface only to log migration progress seems like overkill.
In #3 I implemented ability to add pre/post migration hooks. Hook has following signature:
So you can add "pre" hook like this:
(see PR for details on hooks api)
That pretty much solves the issue without extra bloating.
Except, maybe, debugging. Debug log is not something user would like to face, so we can simply bake any logger in, and make option to enable it.
Your thoughts ?
The text was updated successfully, but these errors were encountered: