Pedrob/336 set log level

Fix to bug report #336