How to include stack trace in log but not in email

I want stack trace included in logs I write to file but not in emails sent to alert me to problems (it is not a good security practice). How do I do that? This is what I have:

defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

      'levels'=> '', //, info, error, warning', // empty means all levels = default
      'categories'=>'',//'application',// system.*', // default = empty = all categories
        'sentFrom' => '',
        'levels'=>'error, warning',

There is no such ability in Yii 1.