Index: applications/pmsm/Barcelona/Mz.m
===================================================================
--- applications/pmsm/Barcelona/Mz.m (revision 706)
+++ applications/pmsm/Barcelona/Mz.m (revision 871)
@@ -30,5 +30,5 @@
     'drv', Orv,...
     'rv', struct('type','rv', 'names', {{'EKFMz'}},'sizes',[5]),...
-	 'options','logll,logbounds')};
+	 'log_level','logevidence,logbounds')};
 	
 %S.logger= struct(	'type','mexlog','maxlen',32000);
Index: applications/pmsm/Barcelona/pwm.cfg
===================================================================
--- applications/pmsm/Barcelona/pwm.cfg (revision 338)
+++ applications/pmsm/Barcelona/pwm.cfg (revision 871)
@@ -27,5 +27,5 @@
 	//drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
 	rv = {type="rv"; names=["EKF"]; sizes=[4];};
-	options="logbounds";
+	log_level="logbounds";
 	},
 		///////////
Index: applications/pmsm/Barcelona/real.cfg
===================================================================
--- applications/pmsm/Barcelona/real.cfg (revision 349)
+++ applications/pmsm/Barcelona/real.cfg (revision 871)
@@ -28,5 +28,5 @@
 	 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
 	 rv = {type="rv"; names=["EKFMz"]; sizes=[5];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 }
 );
Index: applications/pmsm/Barcelona/Mz.cfg
===================================================================
--- applications/pmsm/Barcelona/Mz.cfg (revision 365)
+++ applications/pmsm/Barcelona/Mz.cfg (revision 871)
@@ -11,5 +11,5 @@
 	profileW = [0, 1, 5, 10, 10, 3, 0, 0, -3, -3, -10, -10, -4, 0, 0];
 	profileM = [0, 10, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0];
-	options = "modelu";
+	log_level = "logvoltage";
 };
 
@@ -32,5 +32,5 @@
 	 //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u
 	 rv = {class="RV"; names=("EKFMz"); sizes=[5];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 },
 				 //
@@ -47,5 +47,5 @@
 	 //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u
 	 rv = {class="RV"; names=("EKF"); sizes=[4];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 },
 				 				 //
@@ -62,5 +62,5 @@
 	 //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u
 	 rv = {class="RV"; names=("EKFw"); sizes=[4];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 },
 
@@ -78,5 +78,5 @@
 	 //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u
 	 rv = {class="RV"; names=("CRB"); sizes=[5];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 }
 
Index: applications/pmsm/Barcelona/pwm_mx.cfg
===================================================================
--- applications/pmsm/Barcelona/pwm_mx.cfg (revision 349)
+++ applications/pmsm/Barcelona/pwm_mx.cfg (revision 871)
@@ -11,5 +11,5 @@
 	profileW = [1, 5, 10, 100, 3, 3, 0, 0];
 	//profileM = [0, 0, 10,  10, 10, 0, 10, 0];
-	options = "modelu";
+	log_level = "logvoltage";
 };
 
Index: applications/pmsm/Barcelona/real_mx.cfg
===================================================================
--- applications/pmsm/Barcelona/real_mx.cfg (revision 349)
+++ applications/pmsm/Barcelona/real_mx.cfg (revision 871)
@@ -26,5 +26,5 @@
 	 drv = {type="rv"; names=["o_ia","o_ib","o_ua","o_ub"];};  // observed u
 	 rv = {type="rv"; names=["EKFMz"]; sizes=[5];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 },
 	 {type="EKF";
@@ -41,5 +41,5 @@
 	 drv = {type="rv"; names=["o_ia","o_ib","o_ua","o_ub"];};  // observed u
 	 rv = {type="rv"; names=["EKF"]; sizes=[4];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 }
 );
Index: applications/pmsm/Barcelona/MM.cfg
===================================================================
--- applications/pmsm/Barcelona/MM.cfg (revision 342)
+++ applications/pmsm/Barcelona/MM.cfg (revision 871)
@@ -26,5 +26,5 @@
 	 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
 	 rv = {type="rv"; names=["EKF"]; sizes=[4];};
-	 options="logll";
+	 log_level="logevidence";
 	 };
 E2= {type="EKF";
@@ -41,5 +41,5 @@
 	 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
 	 rv = {type="rv"; names=["EKFw"]; sizes=[4];};
-	 options="logll";
+	 log_level="logevidence";
 	 };
 	 
@@ -51,5 +51,5 @@
 	 	{type="internal";path="E1";},
 		{type="internal";path="E2";});
-		options="logll";
+		log_level="logevidence";
 	});
 	
Index: applications/pmsm/Barcelona/Mz_mx.cfg
===================================================================
--- applications/pmsm/Barcelona/Mz_mx.cfg (revision 352)
+++ applications/pmsm/Barcelona/Mz_mx.cfg (revision 871)
@@ -11,5 +11,5 @@
 	profileW = [0, 3, 10, 10, 3, 0, 0, -3, -3, -3, -10, -10, -4, 0, 0];
 	profileM = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
-//	options = "modelu";
+//	log_level = "logvoltage";
 };
 
@@ -28,5 +28,5 @@
 	 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
 	 rv = {type="rv"; names=["EKFMz"]; sizes=[5];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 },
 				 //
@@ -45,5 +45,5 @@
 	 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
 	 rv = {type="rv"; names=["CRB"]; sizes=[5];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 },
 
@@ -61,5 +61,5 @@
 	 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
 	 rv = {type="rv"; names=["CRB2"]; sizes=[4];};
-	 options="logll,logbounds";
+	 log_level="logevidence,logbounds";
 	 }
 
Index: applications/pmsm/pmsmDS.h
===================================================================
--- applications/pmsm/pmsmDS.h (revision 744)
+++ applications/pmsm/pmsmDS.h (revision 871)
@@ -21,4 +21,5 @@
 class pmsmDS : public DS
 {
+	LOG_LEVEL(pmsmDS,logvoltage);
 
 protected:
@@ -32,8 +33,5 @@
     double dt_prof;
     //! Number of miliseconds per discrete time step
-    int Dt;
-    //! options for logging, - log predictions of 'true' voltage
-    bool opt_modu;
-    //! options for logging, -
+    int Dt;    
 public:
     //! Constructor with fixed sampling period
@@ -49,10 +47,6 @@
         pmsmsim_set_parameters ( Rs0, Ls0, Fmag0, Bf0, p0, kp0, J0, Uc0, DT0, dt0 );
     }
-    //! parse options: "modelu" => opt_modu=true;
-    void set_options ( string &opt )
-    {
-        opt_modu = ( opt.find ( "modelu" ) !=string::npos );
-    }
-    void getdata ( vec &dt ) const
+
+	void getdata ( vec &dt ) const
     {
         dt.set_subvector(0,vec ( KalmanObs,6 ));
@@ -123,5 +117,5 @@
         L_iu = L.add_vector ( ru, "t" );
         // log differences
-        if ( opt_modu )
+        if ( log_level[logvoltage] )
         {
             L_optu = L.add_vector ( ru, "model" );
@@ -135,5 +129,5 @@
         L.log_vector ( L_ou, vec_2 ( KalmanObs[0],KalmanObs[1] ) );
         L.log_vector ( L_iu, vec_2 ( KalmanObs[4],KalmanObs[5] ) );
-        if ( opt_modu )
+        if ( log_level[logvoltage] )
         {
             double sq3=sqrt ( 3.0 );
@@ -181,5 +175,5 @@
 
         string opts;
-        if ( root.lookupValue( "options", opts ) )
+        if ( root.lookupValue( "log_level", opts ) )
             set_options(opts);
     }
Index: applications/pmsm/filters.h
===================================================================
--- applications/pmsm/filters.h (revision 767)
+++ applications/pmsm/filters.h (revision 871)
@@ -137,10 +137,5 @@
 		this->set_BM ( *kal );
 
-		string opt;
-		if ( UI::get ( opt,set,"options",UI::optional ) ) {
-			set_options ( opt );
-		}
-
-		validate();
+		UI::get ( log_level,set,UI::optional );
 	}
 	void bayes ( const vec &yt, const vec &cond ) {
Index: applications/pmsm/cfg/mpf_test.cfg
===================================================================
--- applications/pmsm/cfg/mpf_test.cfg (revision 661)
+++ applications/pmsm/cfg/mpf_test.cfg (revision 871)
@@ -16,5 +16,5 @@
 	drv = {class="RV"; names=("o_ia","o_ib","o_ua","o_ub");};
 	rv = {class="RV"; names=("e_ia","e_ib","e_om","e_th");};
-	options = "logbounds";
+	log_level = "logbounds";
 	n=20;
 	}
Index: applications/pmsm/cfg/sim.cfg
===================================================================
--- applications/pmsm/cfg/sim.cfg (revision 676)
+++ applications/pmsm/cfg/sim.cfg (revision 871)
@@ -25,5 +25,5 @@
 		//drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
 		rv = {class="RV"; names=("EKF"); sizes=[4];};
-		options = "logbounds";
+		log_level = "logbounds";
 	 }                                       
 );
Index: applications/pmsm/cfg/uni_test.cfg
===================================================================
--- applications/pmsm/cfg/uni_test.cfg (revision 686)
+++ applications/pmsm/cfg/uni_test.cfg (revision 871)
@@ -35,5 +35,5 @@
 	rvc = {class="RV"; names=("o_ua","o_ub");};
 	rv = {class="RV"; names=("e_ia","e_ib","e_om","e_th");};
-	options = "logbounds";
+	log_level = "logbounds";
 	n=1000;
 	}
Index: applications/pmsm/TR2245/unitsteps.cpp
===================================================================
--- applications/pmsm/TR2245/unitsteps.cpp (revision 744)
+++ applications/pmsm/TR2245/unitsteps.cpp (revision 871)
@@ -87,7 +87,7 @@
 	int l_Q= L->add_vector ( rQ, "" );
 
-	KFE.set_options ( "logbounds" );
+	KFE.log_level[ logbounds] = true;
 	KFE.log_register ( *L,"KF" );
-	M.set_options ( "logbounds" );
+	M.log_level[logbounds] = true;
 	M.log_register ( *L,"M" );
 	L->init();
Index: applications/pmsm/TR2245/wishart.cpp
===================================================================
--- applications/pmsm/TR2245/wishart.cpp (revision 706)
+++ applications/pmsm/TR2245/wishart.cpp (revision 871)
@@ -83,7 +83,7 @@
 	int l_fullQ= L->add ( rQ, "full" );
 
-	KFE.set_options ( "logbounds" );
+	KFE.log_level[logbounds] = true;
 	KFE.log_add ( *L,"KF" );
-	M.set_options ( "logbounds" );
+	M.log_level[logbounds]= true;
 	M.log_add ( *L,"M" );
 	L->init();
Index: applications/pmsm/TR2245/pmsm_wishart.cpp
===================================================================
--- applications/pmsm/TR2245/pmsm_wishart.cpp (revision 706)
+++ applications/pmsm/TR2245/pmsm_wishart.cpp (revision 871)
@@ -83,7 +83,7 @@
 	dirfilelog *L = UI::build<dirfilelog> ( F, "logger" );// ( "exp/mpf_test",100 );
 	
-	KFE.set_options ( "logbounds" );
+	KFE.log_level[logbounds] = true;
 	KFE.log_add ( *L,"KF" );
-	M.set_options ( "logbounds" );
+	M.log_level[logbounds] = true;
 	M.log_add ( *L,"M" );
 	DS->log_add(*L);
