logging: added initialize function, allows setting the log level exactly once.