Showing 1-12 of 12 items.

What SQL-Statement creates yii?

Created 8 years ago by Necip Necip, updated 8 years ago by Necip Necip. 0 comments

The usual way to find out what Yii has created for an SQL query is to mutilate the SQL in the sourcecode and call the program again so that the SQL statement with errors is displayed. Or you can use the SQL logger, which must be switched on and off each time and logs all SQL statements, which leads to an enormous slowdown in program execution and decelerates your workflow.

0 0
1
Viewed: 17 327 times
Version: 1.1
Category: Tips

Logging to Heroku's logs from Yii

Created 13 years ago by aarondfrancis aarondfrancis, updated 12 years ago by aarondfrancis aarondfrancis. 0 comments

In order to get your Yii logs into Heroku's logs, you have to work a little bit of magic. You'll need to modify the boot.sh script and add the following two lines: ~~~ touch /app/apache/logs/app_log tail -F /app/apache/logs/app_log & ~~~ This will set up the log and tail it so that when you request "heroku logs", this log is included.

1 0
1
Viewed: 13 609 times
Version: 1.1
Category: How-tos

Access log output from unit tests

Created 14 years ago by Mike Mike, updated 14 years ago by Mike Mike. 2 comments

Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

3 0
2
Viewed: 19 154 times
Version: 1.1
Category: Tips

How to re enable logging during unit testing

Created 14 years ago by Asgaroth Asgaroth, updated 14 years ago by Asgaroth Asgaroth. 3 comments

Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

11 0
10
Viewed: 29 270 times
Version: 1.1
Category: How-tos

How to log and debug variables using CWebLogRoute

Created 15 years ago by Antonio Ramirez Antonio Ramirez, updated 15 years ago by Antonio Ramirez Antonio Ramirez. 8 comments

Yii comes with a set of powerful classes for logging. If you have read the documentation about logging messages, you have noticed that we can actually decide which messages we wish to log. And this is exactly what we are going to do, using [CWebLogRoute](http://www.yiiframework.com/doc/api/1.1/CWebLog...

13 0
20
Viewed: 82 712 times
Version: 1.1
Category: How-tos

How to log changes of ActiveRecords?

Created 17 years ago by pfth pfth, updated 14 years ago by Yang He Yang He. 7 comments

A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a [CActiveRecord] Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecor...

31 1
47
Viewed: 85 340 times
Version: 1.1
Category: Tutorials