Yes,you are right. The define('YII_DEBUG',true)
display exception on you browser screen .
The Log for same is also create in protected/runtime/*.log
The YII_TRACE_LEVEL number determines how many layers of each error or stack should be recorded in your trace messages i.e. how long log you want to see.
You can read more about it click here