Skip to content

Instantly share code, notes, and snippets.

@jmoz
Created May 16, 2011 15:34
Show Gist options
  • Select an option

  • Save jmoz/974666 to your computer and use it in GitHub Desktop.

Select an option

Save jmoz/974666 to your computer and use it in GitHub Desktop.
Logger observer
<?php
class ClientSymfonyLoggerObserver implements SplObserver {
private function update(SplSubject $subject) {
sfContext::getInstance()->getLogger()->info("Calling service " . get_class($subject->getService()) . " with url {$subject->getService()->getUrl()}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment