refactoring of the logger config - making it dynamic