maaz
maaz

Reputation: 3666

CakePhp :: How to set up logger for easy debugging?

How to set up logger in cakePhp?

i want to print the parameters which is passed to the controller? how can i do that in cakePhp?

Upvotes: 0

Views: 345

Answers (2)

ok32
ok32

Reputation: 1321

If you want to write to log file:

$this->log($this->params, 'debug');

For more info: http://book.cakephp.org/2.0/en/core-libraries/logging.html

Upvotes: 2

Sudhir Bastakoti
Sudhir Bastakoti

Reputation: 100175

Well, if you want to print parameters then:


debug($this->params);

would do it. You can use it in AppController within a function and calling that function in specific controller action. Hope that helps

Upvotes: 1

Related Questions