mysql - Logging fewer entries into Yii console.log -


I have an application with many concurrent console jobs in a database Yii due to high concurrency Sometimes I get MySQL deadlock errors Sometimes it can be too much console.log The file gets very big, and it translates more expenses.

I want to launch specific examples of CDbException , or at least

YII__DEBUG has already been commented .

Can anyone please help me understand how to do this?

Thanks a lot!

Regards.

I have decided to modify the log statement in yii / framwework / db / cdbcommand.php which That was failing SQL logging. I changed it to a trace statement:

Yii :: Trace (Yii :: t ('yii', 'cdb comand :: {method} () failed: {error}. SQL statement executed Was done: {Sql}. ', Array (' {method} '=> $ method,' {error} '= & gt; $ message,' {sql} '=> $ this-> ; GetText (). $ Par)), Cloger :: Levellier, 'System DB CDDB Commands');

I'm catching the exception and logging a more compact version of the sentence, so it's okay for me. / P>

This was the easiest way to get what we could get we do not update Yii often, so if we go to the next version, then I may repeat the change.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -