Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. lkdocs created this gist Apr 1, 2015.
    9 changes: 9 additions & 0 deletions LaunchKey PHP SDK - Add Logger - Monolog.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    $logger = new \Monolog\Logger('launchkey', new \Monolog\Handler\ErrorLogHandler());

    $config = new \LaunchKey\SDK\Config();
    $config->setAppKey("1234567890")
    ->setSecretKey("supersecretandwayrandomsecretkey")
    ->setPrivateKeyLocation("/usr/local/etc/launchkey-app-private-key.pem")
    ->setLogger($logger);

    $client = \LaunchKey\SDK\Client::factory($config);