schemachange icon indicating copy to clipboard operation
schemachange copied to clipboard

Incorporate logging module instead of print function

Open tsingh2k15 opened this issue 2 years ago • 4 comments

I wanted to share few of my thoughts and get your thoughts on it.

  • Can we use logger instead of print statements in this tool?
  • Can we leverage https://click.palletsprojects.com/en/8.0.x/ for this CLI tool?

If any of these suggestions is relevant, I am open to collaborate and contribute on these. Thank you!

tsingh2k15 avatar Dec 21 '21 18:12 tsingh2k15

Hey there @tsingh2k15, so sorry for the slow response here, things have been crazy! The second item doesn't seem as urgent as schemachange already has decent CLI support. But I am curious to hear more about your first item. And in particular I'm curious how it would then integrate with virtually any CI/CD tool like schemachange does now. By printing to the command line the CI/CD tools capture the output and make it easily viewable. How would this work with a logging library instead? (I haven't researched this so I'm curious).

sfc-gh-jhansen avatar Mar 21 '22 20:03 sfc-gh-jhansen

Not sure but I think the idea for the logging is that anyone can easly patch and create loggers / formatters to send the logs where they want (for example remote)

The logger by default could be configured to print to stdout.

Another benefit will that we can set the verbosity - debug, info etc.

gudata avatar Sep 27 '22 14:09 gudata