Logger wrapper to dynamically decide the log level