And firstly write get_logger() function. It provides common mechanism for creating logger instances inside scripts.