I am using log4php and within my objects, I would like to log the object variables upon entry and exit of a method (for debug purposes). I came across log4php's renderer functionality and thought it would be a great idea but I am unable to get it to work.
public function someMethod() {
$this->logger->debug($this); //entry log
... do something ...
$this->logger->debug($this); //exit log
}
The application throws an error stating that log4php cannot convert the object to a string. Should I be doing something else in order for the renderer to work?
A point to note - the object does have several private and protected variable - no public variables. Perhaps this is an issue - but then I didnt note that statement anywhere in the docs.
Thanks in advance