Page 1 of 1

Log problem - Fatal error... enable

Posted: Wed Oct 10, 2007 3:01 am
by cybercog
Hello,

I'm getting this:
Fatal error: Call to a member function enable() on a non-object in /home/dstefani/public_html/mailer3.php on line 7

Here is the code:

Code: Select all

require_once "swift_lib/Swift.php";
require_once "swift_lib/Swift/Connection/SMTP.php";
$swift = new Swift(new Swift_Connection_SMTP("mail.fakesitename.com"));
$swift->log->enable();
It dies here at line 7 no matter what comes next.

Thanks,

- Don

Posted: Wed Oct 10, 2007 4:14 am
by Chris Corbyn
The API changed in version 3.3.

Code: Select all

$log = Swift_LogContainer::getLog();
$log->setLogLevel(4); //4 is highest, 0 is off