Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging in upgrade #26

Open
MrLucio opened this issue Jul 22, 2020 · 3 comments
Open

Logging in upgrade #26

MrLucio opened this issue Jul 22, 2020 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@MrLucio
Copy link

MrLucio commented Jul 22, 2020

Make the migrator call the upgrade/downgrade method passing the logger, this way you can use it manually whenever you want.

@MrLucio MrLucio added the enhancement New feature or request label Jul 22, 2020
@MrLucio MrLucio changed the title Log in upgrade Logging in upgrade Jul 22, 2020
@rooterkyberian
Copy link
Contributor

can't you have migrations define they own loggers (getLogger("app.migrations.migration_name")) and then configure logger handlers on the application level?

@MrLucio
Copy link
Author

MrLucio commented Jul 23, 2020

I was trying to avoid importing the logging module into every single migration.
If generating migrations would add the logging module (given the proper argument to the method call) that would be a good solution.

@rooterkyberian
Copy link
Contributor

I thought I already implemented custom migration templates, but I guess not (#28).
Adding logger to each migration in default template would be good enough here.

@rooterkyberian rooterkyberian added the good first issue Good for newcomers label Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants