Again this is pretty ugly, use an if/else to control logging instead of doing it inside the logging statement.