Moved logging initialization outside the module and added the test.py, demonstrating most of the functions.